File Coverage

blib/lib/CGI/Stateless.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 22 23 95.6


line stmt bran cond sub pod time code
1             package CGI::Stateless;
2              
3 3     3   81828 use warnings;
  3         8  
  3         120  
4 3     3   17 use strict;
  3         5  
  3         144  
5 3     3   14 use Carp;
  3         12  
  3         281  
6              
7 3     3   2886 use version; our $VERSION = qv('1.0.2'); # update POD & Changes & README
  3         7420  
  3         18  
8              
9             # update DEPENDENCIES in POD & Makefile.PL & README
10 3     3   317 use base 'CGI';
  3         5  
  3         9858  
11              
12              
13             # override the initialization behavior so that
14             # state is NOT maintained between invocations
15 3     3 0 15974 sub save_request { }
16              
17              
18             1; # Magic true value required at end of module
19             __END__
20              
21             =head1 NAME
22              
23             CGI::Stateless - Make CGI.pm stateless for use in persistent environment
24              
25              
26             =head1 VERSION
27              
28             This document describes CGI::Stateless version 1.0.2
29              
30              
31             =head1 SYNOPSIS
32              
33             use CGI::Stateless;
34              
35             # When new request come in FastCGI-like persistent environment:
36              
37             local *STDIN;
38             open STDIN, '<', \$stdin or die "open STDIN: $!\n";
39             local %ENV = %env;
40             local $CGI::Q = CGI::Stateless->new();
41              
42             # Now you can AGAIN call CGI.pm methods like CGI::param(), etc.
43              
44              
45             =head1 DESCRIPTION
46              
47             Force CGI.pm to parse %ENV and STDIN B<AGAIN> in FastCGI-like persistent script.
48              
49              
50             =head1 INTERFACE
51              
52             Use it just like shown in SYNOPSIS, there no other use.
53              
54              
55             =head1 DIAGNOSTICS
56              
57             None.
58              
59              
60             =head1 CONFIGURATION AND ENVIRONMENT
61              
62             CGI::Stateless requires no configuration files or environment variables.
63              
64              
65             =head1 DEPENDENCIES
66              
67             CGI
68              
69              
70             =head1 INCOMPATIBILITIES
71              
72             None reported.
73              
74              
75             =head1 BUGS AND LIMITATIONS
76              
77             No bugs have been reported.
78              
79             Please report any bugs or feature requests to
80             C<bug-cgi-stateless@rt.cpan.org>, or through the web interface at
81             L<http://rt.cpan.org>.
82              
83              
84             =head1 AUTHOR
85              
86             Alex Efros C<< <powerman-asdf@ya.ru> >>
87              
88              
89             =head1 LICENSE AND COPYRIGHT
90              
91             Copyright (c) 2009, Alex Efros C<< <powerman-asdf@ya.ru> >>. All rights reserved.
92              
93             This module is free software; you can redistribute it and/or
94             modify it under the same terms as Perl itself. See L<perlartistic>.
95              
96              
97             =head1 DISCLAIMER OF WARRANTY
98              
99             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
100             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
101             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
102             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
103             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
104             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
105             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
106             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
107             NECESSARY SERVICING, REPAIR, OR CORRECTION.
108              
109             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
110             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
111             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
112             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
113             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
114             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
115             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
116             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
117             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
118             SUCH DAMAGES.