On 05/03/2012 10:49 AM, Lawrence Statton wrote:
On 05/03/2012 07:41 AM, Mark Haney wrote:
On 05/02/2012 03:53 PM, Octavian Rasnita wrote:
I'm really quite intrigued by the assertion that CGI is very seldom
used.
Well, do you mean "CGI.pm" the perl module, which is, AFAIK rarely used
any more except in legacy applications. Gosh knows *I* haven't used it
in new code in a decade.
Yes that is what I mean. It was my mistake to not clarify.
If you mean "CGI the common gateway interface", then I suppose it's
still used by some, but more often than not, I suspect that modern sites
are using a "Looks like CGI to the programmer, but is not REALLY CGI,
because it doesn't spawn a new process" (Popular implementatoins are
FastCGI and the CGI-like ModPerl::Registry)
Based on this entire thread, the Template Toolkit is used entirely
for building websites in perl.
I STRONGLY disagree ... Template CAN be used to produce HTML under a
webserver, but I'd say that is not it's "entire use", and since it is
the "out of the box" default view implementation for Catalyst (which is
one of the 900-pound-gorillas in the Perl MVC Web pantheon) it has
substantial traction, but sitting down and starting from a blank page
and writing a site with it is pretty uncommon as well.
I think I admitted that I was speaking of the full functionality of a
modern website.
And unless I'm mistaken, what other way
than CGI could perl possibly be used in this manner?
I can't speak for everyone else on the web, but around year 2000,
mod_perl under Apache made CGI (the protocol) as dead as the dodo.
I'm also not used to being talked down to like a child. Why would I
think the Template Toolkit includes CGI? Well, if my OP had been read,
you would have seen that /in the example/ in the documentation, no
mention of including CGI in the code was made
In *WHAT* example? You are referencing some piece of code that most of
us have NEVER SEEN and assuming (a common bad habit you seem to have)
that we know what you're seeing. You also seem to be conflating "Using a
perl module to produce HTML" and "Using a perl module to serve HTML
inside a server", which are two different tasks. Related tasks, but
easily isolated.
IIRC I mentioned in the OP that I was following the tutorial in the
Template Toolkit documentation. And I also posted my code and the HTML
output I was getting. I didn't think I needed to continually include
such attachments to each reply.
[two paragraphs of deletia...]
In other words, I'm just about at the 'I give up' stage and moving
everything to a platform that has a good helpful community. My apologies
to those that have helped. It's been greatly appreciated, but I'm about
as frustrated as I can possibly be.
If you want to know why you're getting poor help from this list, your
last paragraph is the exact reason. You came into the list a week ago
with a chip on your shoulder, and started trolling. You're now reaping
the benefits of your own attitude.
I have been on this list for much longer than a week. Several months in
fact, however since I don't believe I know enough to be helpful, I tend
to keep my mouth shut until I have a question. Which I did, and now
feel like my mistake was in asking said question.
If you want to use PHP, use PHP. If you want to use Perl, use Perl. I
cannot imagine that anyone but you really gives the posterior end of a
rat which tool you choose to use.
You're right. I have already made it clear that I shouldn't have brought
that up.
If you are comfortable with PHP, I'm not sure why you chose Template
Toolkit -- I would think that Mason would have been a much better fit to
your past experience. It has a MUCH steeper "getting started" curve
(just lots of things to install) , but with a modern Unix, your package
manager should allow you to get apache+mod_perl+mason installed in just
a few tens of minutes.
Let me just say a couple of more things before putting this thread to
rest.
One, in the original post of mine about PHP and perl interaction I was
told to try the template-toolkit, mason, dancer, catalyst, etc. I
looked into each one and decided on the toolkit. At no time did anyone
mention that it's 'uncommon' to build a website with just the toolkit.
Information like that is extremely useful to those who are getting their
feet wet and would like the experience and wisdom of those in the know.
It would have been even more helpful had that tidbit been mentioned
back when replying to my first post.
Two, it appears I have hit an impasse on using the toolkit. Ubuntu
doesn't offer the Apache::Template module in a .deb package and I would
prefer not to use CPAN to keep from potentially blowing the other
modules up. Mason's perl modules are available, but I'm not quite sure
what my next step will be at this point.
I'd /really/ like to find a good stable templating
system/method/package/whatever IN PERL that I can get this web app up
and running without too much trouble.
I'm afraid I've spent just about too much time researching this because
I've wanted to keep everything in perl and simply didn't know enough to
make an informed decision.
So, it's back to the drawing board, I think.
--
Mark Haney
Software Developer/Consultant
AB Emblem
ma...@abemblem.com
Linux marius.homelinux 3.3.2-6.fc16.x86_64 GNU/Linux
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/