Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl vs. ModPerl

by alien_life_form (Pilgrim)
on May 31, 2002 at 10:57 UTC ( [id://170668]=note: print w/replies, xml ) Need Help??


in reply to Perl vs. ModPerl

Greetings,

In fact, you can use mod_perl simply as a CGI accelerator by running under Apache::Registry,or even - egads! - under the wily Apache::PerlRun. In the second case, you would be using mod_perl in a way that's very close to the way you described.

Apache::Registry scripts also cache a compiled version of your code, achieving a much better speed up, but only the cleanest and better structured CGI programs will run without modification under Apache::Registry.

And, as others mentioned, there's much, much more to mod_perl, and the SAMS book "the mod_perl developers' cookbook" is a fantastic guide to it.
Cheers,
alf


You can't have everything: where would you put it?

Replies are listed 'Best First'.
Re: Re: Perl vs. ModPerl
by dsheroh (Monsignor) on May 31, 2002 at 14:06 UTC
    only the cleanest and better structured CGI programs will run without modification under Apache::Registry.

    ...and they should all be that clean and well-structured.

    (I see this the opposite way, alien_life_form - only sloppy code fails under Apache::Registry.)

      Greetings,

      You are right - in fact I tend to think so myself, and would have written as much, except for the embedded subroutine trap which does not necessarily mean the starting code was sloppy...

      BUt apart from that (which is avoided by using packages, arguably a way of achieving better code structure), I have from some time decided to write modperl-compliant CGI code even when I know it will never run under modperl....
      call it the superstrict pragma, if you wish ;)
      Cheers,
      alf


      You can't have everything: where would you put it?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://170668]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-03-28 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found