Hello Brett Sanger,
Friday, November 15, 2002, 1:25:19 AM, you wrote:
>> > $r->set_handlers('PerlHandler",\&My::Package::handler);
>>
>> set_handlers() should work. keep in mind that it's current not
>> possible (IIRC) to set_handler() for the current phase. so, for the
>> PerlHandler you'd want to do it from someplace else, like your
>> PerlAccessHandler or something.
BS> Which is ideal for me, since I'm trying to set it in the
BS> PerlAccessHandler
>> oh, and the syntax doesn't require a coderef -
>> $r->set_handlers(PerlHandler => 'My::Package');
>> works too.
BS> Each of these:
$r->>set_handlers(PerlHandler => 'My::Package');
$r->>set_handlers(PerlHandler => 'My::Package::handler');
$r->>set_handlers(PerlHandler => \&My::Package);
$r->>set_handlers(PerlHandler => \&My::Package::handler);
BS> give me:
BS> [error] Can't set_handler with that value
BS> Any ideas?
BS> (I've also tried the same variations on
$r->>set_handlers(PerlHandler =>
BS> 'Apache::ROOT::path::to::myscript_23pl');
BS> to try and convince it to load my Apache::Registry scripts, with the
BS> same results
BS> )
from the 'perldoc Apache'
$r->set_handlers( $hook, [\&handler, ... ] )
Sets the list if handlers to be called for $hook.
$hook is a string representing the phase to handle.
The list of handlers is an anonymous array of code
references to the handlers to install for this request
phase. The special list [ \&OK ] can be used to
disable a particular phase.
$r->set_handlers( PerlLogHandler => [ \&myhandler1, \&myhandler2 ]
);
$r->set_handlers( PerlAuthenHandler => [ \&OK ] );
See ? It await for arrayref not scalar or coderef :(, and the sub name
too.
--
WBR, Mike P. Mikhailov
mailto:mike@;sibtel.ru
Moving the mouse won't get you into trouble... Clicking it might