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