Verifying Which Handler

2002-08-08 Thread Jeff Crist
Title: Message



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 
whenrunning scripts on ourwebsite (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

2002-08-08 Thread Stas Bekman

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 BekmanJAm_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