You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brian Duggan <bd...@matatu.org> on 2005/11/03 17:16:23 UTC

Apache::Constants qw(HTTP_OK)

Hi modperl,

The SYNOPSIS for Apache::TestRequest says :

    use Apache::Test qw(ok have_lwp);
    use Apache::TestRequest qw(GET POST);
    use Apache::Constants qw(HTTP_OK);

    plan tests => 1, have_lwp;

    my $res = GET '/test.html';
    ok $res->code == HTTP_OK, "Request is ok";

But, this seems not to work for me since HTTP_OK doesn't 
get properly exported by Apache::Constants unless I'm running 
from within a response handler.

    $ perl -MApache::Constants=HTTP_OK -e 'print HTTP_OK'
    Undefined subroutine &Apache::Constants::HTTP_OK called at -e line 1.

What am I missing?

-Brian