You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jeff Crist <je...@crist.com> on 2002/08/08 23:19:48 UTC

Verifying Which Handler

Can someone send me an example of a test Perl script that will display
which Perl handler Apache is using - Apache::Registry or PerlRun.
 
We just migrated our website to a new server that was initially setup to
run Appache::Registry but we don't have time to cleanup the code so I
change the configuration (at least thought I did) to PerlRun.  However
we are seeing random behavior when running scripts on our website (the
content of the page unexplainably changes sometimes) that seem to
indicate variables are not being reset (ie, maybe we are still using the
Apache::Registry handler)   Another tipoff was when he had to go change
all the exit commands in the Perl scripts to Apache::exit();
 

Re: Verifying Which Handler

Posted by Stas Bekman <st...@stason.org>.
Jeff Crist wrote:
> Can someone send me an example of a test Perl script that will display 
> which Perl handler Apache is using - Apache::Registry or PerlRun.
>  
> We just migrated our website to a new server that was initially setup to 
> run Appache::Registry but we don't have time to cleanup the code so I 
> change the configuration (at least thought I did) to PerlRun.  However 
> we are seeing random behavior when running scripts on our website (the 
> content of the page unexplainably changes sometimes) that seem to 
> indicate variables are not being reset (ie, maybe we are still using the 
> Apache::Registry handler)   

 From the scripts you can use Carp::cluck() or for the fine tuning caller().

You can also do it globally, set in the startup file:

$Apache::Registry::Debug = 1;
$Apache::PerlRun::Debug = 1;

and then the handlers will spit some debug info which should help.

> Another tipoff was when he had to go change 
> all the exit commands in the Perl scripts to Apache::exit();

You don't need to do that for registry scripts. It's being done for you 
behind the scenes.

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