Lincoln Stein wrote:
Did I send out something weird? My version looks like this:

        # Turn on special checking for Doug MacEachern's modperl
        if (exists $ENV{MOD_PERL}) {
                 eval "require mod_perl";
                if (defined $mod_perl::VERSION) {
                        if ($mod_perl::VERSION >= 1.99) {
                                $MOD_PERL = 2;
                                require Apache::RequestRec;
                                require Apache::RequestUtil;
                                require APR::Pool;
                         } else {
                                $MOD_PERL = 1;
                                require Apache;
                        }
                }
        }

That's not what you have sent before ;) But it looks OK in the most recent version.


A few more comments.

- I have suggested to add a note explaining why we don't rely on $ENV{MOD_PERL}. I'm sure the reason will be forgotten in the future.

if (exists $ENV{MOD_PERL}) {
   eval "require mod_perl";
   # mod_perl handlers may run system() on scripts using CGI.pm
   # - make sure so we don't get fooled by inherited $ENV{MOD_PERL}
   if (defined $mod_perl::VERSION){ # for shell scripts

- why eval string:

eval "require mod_perl";

shouldn't it be:

eval { require mod_perl };

?


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to