in reply to Perl vs mod_perl and PHP in Apache+MySql setup on WinXP
Why would one need Perl and mod_perl, as it says here, to work on Apache?
Only if one needed to use an application specifically written for mod_perl.
What extras do I get with mod_perl? Would Perl+CGi be just as good or better?
The biggest immediate benefit of mod_perl over Perl+CGI is performance. With a CGI, Perl must be started fresh for each incoming request. With mod_perl, on the other hand, the Perl interpreter stays running as long as Apache is. This provides a significant increase in performance.
Beyond that, mod_perl exposes a lot of functionality that is not available from a CGI. You can do nearly anything with mod_perl that you can do with an Apache module written in C.
How different is mod_perl form ActiveStates Perl 5.8.4 running under WinXP? Will I need to learn mod_perl? Can I just get away with the Perl version that I am currently using?
The Perl interpreter you get in mod_perl is not different from a standalone Perl installation. The only thing you have to learn is the Apache API exposed by mod_perl (and perhaps a few Apache configuration details).
In this tutorial, it further introduces PHP here– yet another scripting language! Can I ask why? Specifically, what is it required for that Perl and/or mod_perl can’t do?
That tutorial appears to be entirely about PHP. I do not see mention of mod_perl at all.
If I am going to have all the above then I don't undertand why do I still need Mason? , where does it fit into all this?
Mason is a templating engine. This is only one piece of a web application, the other pieces generally being application logic and a controller. The controller is usually where mod_perl comes in, which leaves you free to choose between other solutions for the other layers. Mason is only one possible templating engine that you can choose from. Other popular choices are HTML::Template and Template-Toolkit.
|
|---|