Perhaps something along the lines of :
$r->push_handlers(
PerlHandler => sub {
my $r = shift;
my $return = $handle->handler( $r );
if ( $return == Apache::Constants::OK ) {
??
}
}
);
> -Original Message-
> From: Alexei V. Alexandrov [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 17, 2001 9:45 AM
> To: [EMAIL PROTECTED]
> Subject: How to check the return status?
>
>
> Hello everyone,
>
> I have a question that i can not resolve. The module dynamicaly
> loads other modules to handle specific urls like this:
>
> [snip]
> my $handle = 'My::Module';
>
> eval {
> (my $h = $handle) =~ s!::!/!ig;
> require $h . ".pm";
> };
>
> if (!$@) {
>if ($handle->can( "handler" )) {
> $r->handler( "perl-script" );
> $r->push_handlers( PerlHandler =>
> \&{"${handle}::handler"} );
> ??
>}
> }
> [snip]
>
> In this way the control is passed to another module. The module can
> return OK, SERVER_ERROR, etc... How can i check the return status so
> i can handle it (cache the output for example if the module returned
> OK)
>
> Thanks for any advice.
>
> ---
> Best regards,
> Alexei V. Alexandrov
>