line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Pure::Fast; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
75081
|
use base qw(CGI::Pure); |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
1313
|
|
4
|
2
|
|
|
2
|
|
107488
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
41
|
|
5
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
49
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
1038
|
use FCGI; |
|
2
|
|
|
|
|
1946
|
|
|
2
|
|
|
|
|
69
|
|
8
|
2
|
|
|
2
|
|
14
|
use Readonly; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
490
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Constants. |
11
|
|
|
|
|
|
|
Readonly::Scalar my $FCGI_LISTEN_QUEUE_DEFAULT => 100; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = 0.09; |
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__ |