Cookie

 view release on metacpan or  search on metacpan

t/CookieTest.pm  view on Meta::CPAN

    my $jar = Cookie::Jar->new( $r, debug => $debug ) || do
    {
        $r->log_error( "$class: Error instantiating Cookie::Jar object: ", Cookie::Jar->error );
        return( Apache2::Const::HTTP_INTERNAL_SERVER_ERROR );
    };
    $jar->fetch || do
    {
        $r->log_error( "$class: Error fetching cookies from http request: ", $jar->error );
        return( Apache2::Const::HTTP_INTERNAL_SERVER_ERROR );
    };
    my $self = bless( { request => $r, jar => $jar, debug => int( $r->dir_config( 'COOKIES_DEBUG' ) ) } => $class );
    my $code = $self->can( $path );
    if( !defined( $code ) )
    {
        $r->log_error( "No method \"$path\" for testing." );
        return( Apache2::Const::DECLINED );
    }
    $r->err_headers_out->set( 'Test-No' => $path );
    $self->message( "Calling method \"$path\"." );
    my $rc = $code->( $self );
    $r->log_error( "$class: Returning http code '$rc' for method '$path'" );



( run in 0.859 second using v1.01-cache-2.11-cpan-3b35f9de6a3 )