line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- perl -*-
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
579
|
use strict;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
2459
|
use CGI ();
|
|
1
|
|
|
|
|
18481
|
|
|
1
|
|
|
|
|
524
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package XML::EP::Request::CGI;
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$XML::EP::Request::CGI::VERSION = '0.01';
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new {
|
13
|
0
|
|
|
0
|
0
|
|
my $proto = shift;
|
14
|
0
|
|
0
|
|
|
|
my $path = $ENV{'PATH_TRANSLATED'} || shift;
|
15
|
0
|
0
|
|
|
|
|
if ($path =~ /(.*)[\/\\]/) {
|
16
|
0
|
|
|
|
|
|
chdir $1;
|
17
|
|
|
|
|
|
|
}
|
18
|
0
|
|
|
|
|
|
my $self = { 'PATH_TRANSLATED' => $path };
|
19
|
0
|
|
0
|
|
|
|
bless($self, ref($proto) || $proto);
|
20
|
|
|
|
|
|
|
}
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
0
|
|
sub Param { my $self = shift; $self->{cgi}->param(@_) }
|
|
0
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub Client {
|
25
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
26
|
0
|
0
|
0
|
|
|
|
@_ ? ($self->{Client} = shift) :
|
27
|
|
|
|
|
|
|
($self->{Client} || $ENV{HTTP_USER_AGENT});
|
28
|
|
|
|
|
|
|
}
|
29
|
|
|
|
|
|
|
sub Location {
|
30
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
31
|
0
|
0
|
0
|
|
|
|
@_ ? ($self->{Location} = shift) :
|
32
|
|
|
|
|
|
|
($self->{Location} || $ENV{REQUEST_URI});
|
33
|
|
|
|
|
|
|
}
|
34
|
|
|
|
|
|
|
sub VirtualHost {
|
35
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
36
|
0
|
0
|
0
|
|
|
|
@_ ? ($self->{VirtualHost} = shift) :
|
37
|
|
|
|
|
|
|
($self->{VirtualHost} || $ENV{SERVER_NAME});
|
38
|
|
|
|
|
|
|
}
|
39
|
|
|
|
|
|
|
sub PathInfo {
|
40
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
41
|
0
|
0
|
0
|
|
|
|
@_ ? ($self->{PathInfo} = shift) :
|
42
|
|
|
|
|
|
|
($self->{PathInfo} || $ENV{PATH_INFO});
|
43
|
|
|
|
|
|
|
}
|
44
|
|
|
|
|
|
|
sub PathTranslated {
|
45
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
46
|
0
|
0
|
0
|
|
|
|
@_ ? ($self->{PathTranslated} = shift) :
|
47
|
|
|
|
|
|
|
($self->{PathTranslated} || $ENV{PATH_TRANSLATED});
|
48
|
|
|
|
|
|
|
}
|
49
|
|
|
|
|
|
|
sub FileHandle {
|
50
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
51
|
0
|
0
|
0
|
|
|
|
@_ ? ($self->{FileHandle} = shift) : ($self->{FileHandle} || \*STDOUT);
|
52
|
|
|
|
|
|
|
}
|
53
|
|
|
|
|
|
|
sub Uri {
|
54
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
55
|
0
|
0
|
|
|
|
|
if (@_) {
|
56
|
0
|
|
|
|
|
|
$self->{Uri} = shift;
|
57
|
|
|
|
|
|
|
} else {
|
58
|
0
|
|
0
|
|
|
|
$self->{Uri} ||= "http://$ENV{SERVER_NAME}/$ENV{REQUEST_URI}";
|
59
|
|
|
|
|
|
|
}
|
60
|
|
|
|
|
|
|
}
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1;
|