File Coverage

lib/Pod/POM/Web/PSGI.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 18 18 100.0


line stmt bran cond sub pod time code
1             package Pod::POM::Web::PSGI;
2              
3 1     1   955 use strict;
  1         2  
  1         42  
4 1     1   7 use warnings;
  1         3  
  1         57  
5              
6             our $VERSION;
7             BEGIN {
8 1     1   36     $VERSION = '0.002';
9             }
10              
11 1     1   1077 use CGI::Emulate::PSGI;
  1         76353  
  1         38  
12 1     1   1178 use Pod::POM::Web;
  1         1178874  
  1         9  
13              
14             # The PSGI application, returned as the last value
15             # Pod::POM::Web is already designed as a persistent webapp, so that's easy
16             # (for the curious who wants an example of how to wrap a generic CGI application
17             # see on BackPAN how Pod::POM::Web::PSGI 0.001 was implemented)
18             CGI::Emulate::PSGI->handler(sub {
19                 Pod::POM::Web->handler
20             })
21             __END__
22            
23             =head1 NAME
24            
25             Pod::POM::Web::PSGI - Run Pod::POM::Web as a PSGI application
26            
27             =head1 SYNOPSIS
28            
29             Run L<Pod::POM::Web> as a L<PSGI> application with L<plackup>:
30            
31             plackup -e 'require Pod::POM::Web::PSGI'
32            
33             Load Pod::POM::Web as a PSGI application:
34            
35             my $app = require Pod::POM::Web::PSGI;
36            
37             =head1 DESCRIPTION
38            
39             This is a wrapper for L<Pod::POM::Web> to transform it as a L<PSGI> application.
40             This allow then to integrate Pod::POM::Web in a bigger web application, by
41             mounting it for example with L<Plack::Builder>.
42            
43             =head1 SEE ALSO
44            
45             =over 4
46            
47             =item *
48            
49             L<Pod::POM::Web>
50            
51             =item *
52            
53             L<PSGI>, L<Plack>, L<Plack::Builder>
54            
55             =back
56            
57             =head1 AUTHOR
58            
59             Olivier MenguE<eacute>, C<dolmen@cpan.org>
60            
61             =head1 COPYRIGHT & LICENSE
62            
63             Copyright E<copy> 2011 Olivier MenguE<eacute>.
64            
65             This library is free software; you can distribute it and/or modify it
66             under the same terms as Perl 5 itself.
67            
68             =cut
69