line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenPlugin::Request::CGI; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# $Id: CGI.pm,v 1.7 2003/04/03 01:51:26 andreychek Exp $ |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
4217
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
92
|
|
6
|
2
|
|
|
2
|
|
2271
|
use OpenPlugin::Param(); |
|
2
|
|
|
|
|
392
|
|
|
2
|
|
|
|
|
54
|
|
7
|
2
|
|
|
2
|
|
14
|
use base qw( OpenPlugin::Param ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
237
|
|
8
|
2
|
|
|
2
|
|
7359
|
use CGI qw( -no_debug ); |
|
2
|
|
|
|
|
54861
|
|
|
2
|
|
|
|
|
21
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$OpenPlugin::Request::CGI::VERSION = sprintf("%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub init { |
13
|
2
|
|
|
2
|
0
|
6
|
my ( $self, $args ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
2
|
50
|
|
|
|
22
|
unless ( $self->state->{'cgi'} ) { |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Use an existing CGI object if given one |
18
|
2
|
50
|
33
|
|
|
9
|
if(( not exists $self->state->{'cgi'} ) && |
19
|
|
|
|
|
|
|
( ref $args->{'cgi'} eq "CGI" )) { |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
0
|
$self->state->{'cgi'} = $args->{'cgi'}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
# Otherwise, create a new one |
24
|
|
|
|
|
|
|
else { |
25
|
2
|
|
|
|
|
14
|
$self->state->{'cgi'} = CGI->new(); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# Set the uri |
30
|
2
|
|
|
|
|
11
|
$self->state->{'uri'} = $self->state->{'cgi'}->url; |
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
|
|
23
|
return $self; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
14
|
|
|
14
|
0
|
24
|
sub object { my $self = shift; return $self->state->{'cgi'}; } |
|
14
|
|
|
|
|
45
|
|
37
|
0
|
|
|
0
|
0
|
|
sub uri { my $self = shift; return $self->state->{'uri'}; } |
|
0
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |