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?