Denis Banovic wrote:
Hi!
I've a script that looks like this:
if ($runnung_on_mod_perl) { Apache->request->register_cleanup(\&init_globals); }
Under mod_perl 1.0 works fine with Apache::Registry.
Can someone give me an Example how to make a register_cleanup with mod_perl
2?
A copy-n-paste from Apache/compat.pm:
sub register_cleanup { shift->pool->cleanup_register(@_); }
if you use Apache::compat, your mp1 code will work under mp2 unmodified.
And it is documented here: http://perl.apache.org/docs/2.0/user/compat/compat.html#C__r_E_gt_register_cleanup_ http://perl.apache.org/docs/2.0/user/compat/compat.html#C__s_E_gt_register_cleanup_
In the future please refer to the docs first, before asking on the list.
__________________________________________________________________ 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