Apache2-SSI

 view release on metacpan or  search on metacpan

t/SSITest.pm  view on Meta::CPAN

    use constant TEST_URI_1 => './ssi/include.cgi';
    use constant TEST_URI_2 => './not-existing.txt';
};

sub handler : method
{
    my( $class, $r ) = @_;
    $r->log_error( "${class}: Received request for uri \"", $r->uri, "\" matching file \"", $r->filename, "\"." );
    my $uri = APR::URI->parse( $r->pool, $r->uri );
    my $path = [split( '/', $uri->path )]->[-1];
    my $self = bless( { apache_request => $r, debug => int( $r->dir_config( 'Apache2_SSI_DEBUG' ) ) } => $class );
    my $code = $self->can( $path );
    if( !defined( $code ) )
    {
        $r->log_error( "No method \"$path\" for SSI testing." );
        return( Apache2::Const::DECLINED );
    }
    my $res = $code->( $self );
    return( Apache2::Const::OK );
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.873 second using v1.00-cache-2.02-grep-82fe00e-cpan-9e6bc14194b )