Hi!
I'm trying to migrate some stuff from mod_perl 1.
I've read the tutorial on perl.apache.org but it didn't help.
I've a perl 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.
But I can't find out how to port this to mod_perl 2.
I've tried to use
Apache::compat(); but then I got another error from an Module we are using
to cache the script's output:
"ModPerl::Registry: anonymous handlers not (yet) supported at..."
The code looks like this:
...
$self->{r} = Apache->request;
$self->{r}->push_handlers(PerlHandler => sub {$self->DESTROY});
...
1) How to do a register_cleanup with mod_perl 2.0 ?
2) How to fix the second error? googling didn't help.
Can someone please help me with it?
Thanks a lot
Denis Banovic