Pod-POM-Web-PSGI
view release on metacpan or search on metacpan
lib/Pod/POM/Web/PSGI.pm view on Meta::CPAN
Pod::POM::Web::PSGI - Run Pod::POM::Web as a PSGI application
=head1 SYNOPSIS
Run L<Pod::POM::Web> as a L<PSGI> application with L<plackup>:
plackup -e 'require Pod::POM::Web::PSGI'
Load Pod::POM::Web as a PSGI application:
my $app = require Pod::POM::Web::PSGI;
=head1 DESCRIPTION
This is a wrapper for L<Pod::POM::Web> to transform it as a L<PSGI> application.
This allow then to integrate Pod::POM::Web in a bigger web application, by
mounting it for example with L<Plack::Builder>.
=head1 SEE ALSO
=over 4
t/10-psgi.t view on Meta::CPAN
print "1..1\n";
use lib 'lib';
my $app = require Pod::POM::Web::PSGI;
print((ref($app) eq 'CODE' ? 'ok' : 'not ok'), " 1\n");
t/11-status.t view on Meta::CPAN
or plan skip_all => 'Skip test due to missing Plack::Test';
eval { require HTTP::Request::Common; 1 }
or plan skip_all => 'skip test due to missing HTTP::Request::Common';
Plack::Test->import;
HTTP::Request::Common->import;
}
plan tests => 2;
use lib 'lib';
my $app = require Pod::POM::Web::PSGI;
test_psgi $app, sub {
my $cb = shift;
my $res = $cb->(GET "/");
is $res->code, 200;
like $res->content, qr/<html/i;
};
( run in 0.370 second using v1.01-cache-2.11-cpan-05444aca049 )