line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Pure::Fast; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
74856
|
use base qw(CGI::Pure); |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
920
|
|
4
|
2
|
|
|
2
|
|
80211
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
32
|
|
5
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
35
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
779
|
use FCGI; |
|
2
|
|
|
|
|
1478
|
|
|
2
|
|
|
|
|
45
|
|
8
|
2
|
|
|
2
|
|
10
|
use Readonly; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
382
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Constants. |
11
|
|
|
|
|
|
|
Readonly::Scalar my $FCGI_LISTEN_QUEUE_DEFAULT => 100; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = 0.08; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# External request. |
16
|
|
|
|
|
|
|
our $EXT_REQUEST; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Workaround for known bug in libfcgi. |
19
|
|
|
|
|
|
|
while (each %ENV) { } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Constructor. |
22
|
|
|
|
|
|
|
sub new { |
23
|
0
|
|
|
0
|
1
|
|
my ($class, @params) = @_; |
24
|
0
|
0
|
|
|
|
|
if (! defined $EXT_REQUEST) { |
25
|
0
|
0
|
|
|
|
|
if ($ENV{'FCGI_SOCKET_PATH'}) { |
26
|
0
|
|
|
|
|
|
my $path = $ENV{'FCGI_SOCKET_PATH'}; |
27
|
0
|
|
0
|
|
|
|
my $backlog = $ENV{'FCGI_LISTEN_QUEUE'} |
28
|
|
|
|
|
|
|
|| $FCGI_LISTEN_QUEUE_DEFAULT; |
29
|
0
|
|
|
|
|
|
my $socket = FCGI::OpenSocket($path, $backlog); |
30
|
0
|
|
|
|
|
|
$EXT_REQUEST = FCGI::Request(\*STDIN, \*STDOUT, |
31
|
|
|
|
|
|
|
\*STDERR, \%ENV, $socket, 1); |
32
|
|
|
|
|
|
|
} else { |
33
|
0
|
|
|
|
|
|
$EXT_REQUEST = FCGI::Request; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
0
|
0
|
|
|
|
|
if ($EXT_REQUEST->Accept < 0) { |
37
|
0
|
|
|
|
|
|
return; |
38
|
|
|
|
|
|
|
} |
39
|
0
|
|
|
|
|
|
return $class->SUPER::new(@params); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |