perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei V. Alexandrov" <...@elcomsoft.com>
Subject How to check the return status?
Date Mon, 17 Dec 2001 15:44:37 GMT
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


Mime
View raw message