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.


In reply to Re: Perl vs mod_perl and PHP in Apache+MySql setup on WinXP by revdiablo
in thread Perl vs mod_perl and PHP in Apache+MySql setup on WinXP by blackadder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.