Pipeline/Services/CGISimple.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 2 SCAR 12.8
CC
2
Cov
0%
load
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 package WWW::Pipeline::Services::CGISimple;
2 $VERSION = '0.1';
3  
4 #-- pragmas ----------------------------
5 use strict;
6 use warnings;
7  
8 #-- modules ----------------------------
9 use CGI::Simple;
10  
11 =head1 WWW::Pipeline::Services::CGISimple
12  
13 This plugin for Application::Pipeline makes available a query object, which is
14 simply a CGI::Simple instance. To access it from the Application::Pipeline
15 subclass:
16  
17 $pipeline->loadPlugin( 'CGISimple' );
18  
19 $query = $pipeline->query();
20  
21 Optionally, you may indicate to CGI::Simple that you want to enable uploads,
22 like so:
23  
24 $pipeline->loadPlugin( 'CGISimple',
25 DISABLE_UPLOADS => 0
26 );
27  
28 As CGI::Simple disables them by default.
29  
30 =cut
31  
32 #===============================================================================
33 sub load {
34 my( $class, $pipeline, %args ) = @_;
35  
36 $CGI::Simple::DISABLE_UPLOADS = ( $args{DISABLE_UPLOADS} ) ? 1 : 0;
37 my $cgi = CGI::Simple->new();
38 $pipeline->addServices( query => $cgi );
39  
40 return $cgi;
41 }
42  
43 #========
44 1;
45  
46 =head2 Authors
47  
48 Stephen Howard <stephen@thunkit.com>
49  
50 =head2 License
51  
52 This module may be distributed under the same terms as Perl itself.
53  
54 =cut