line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package NgxQueue; |
2
|
3
|
|
|
3
|
|
73820
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
99
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
455
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# load backend (XS or PP) |
8
|
|
|
|
|
|
|
my $use_xs = 0; |
9
|
|
|
|
|
|
|
if (!exists $INC{'NgxQueue/PP.pm'}) { |
10
|
|
|
|
|
|
|
my $pp = $ENV{PERL_ONLY}; |
11
|
|
|
|
|
|
|
if (!$pp) { |
12
|
|
|
|
|
|
|
eval qq{ |
13
|
|
|
|
|
|
|
require XSLoader; |
14
|
|
|
|
|
|
|
XSLoader::load __PACKAGE__, $VERSION; |
15
|
|
|
|
|
|
|
}; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
if (__PACKAGE__->can('new')) { |
18
|
|
|
|
|
|
|
$use_xs = 1; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
else { |
21
|
|
|
|
|
|
|
require 'NgxQueue/PP.pm'; |
22
|
|
|
|
|
|
|
push @NgxQueue::ISA, 'NgxQueue::PP'; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
} |
25
|
2
|
100
|
|
2
|
1
|
36
|
sub BACKEND() { $use_xs ? 'XS' : 'PP' } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |