Philippe M. Chiasson wrote:
>> I was wondering if it's possible to reload a PerlInitHandler's code when
>> a PerlResponseHandler's code changes. I'm inserting PerlResponseHandlers
>> at runtime, but when it's code changes, the code reference set by the
>> PerlInitHandler is pointing to the wrong piece of code. Like this:
> Problem probably is because Apache2::Reload is also a PerlInitHandler and
> probably comes in and reloads the module _after_ your Dispatcher handler.
> You could either try and swap the order of both InitHandlers or use a
> method name instead of a code ref.
> if ($mod->can($sub)) {
> $r->set_handlers(PerlResponseHandler => join '::', $mod, $sub);
> }
The init handlers were in the right order, but your suggestion of using a
method name worked like a charm. Thanks!
--
kind regards,
Tim Esselens