line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Net::IP::Match::Trie; |
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
123964
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
91
|
|
5
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
815
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
require XSLoader; |
10
|
|
|
|
|
|
|
XSLoader::load(__PACKAGE__, $VERSION); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
2
|
|
|
2
|
0
|
12588
|
my($class, %opt) = @_; |
14
|
2
|
|
|
|
|
9
|
my $self = bless {}, $class; |
15
|
2
|
|
|
|
|
38
|
$self->_initialize(); |
16
|
2
|
|
|
|
|
7
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub add { |
21
|
4
|
|
|
4
|
1
|
27
|
my($self, $name, $cidrs) = @_; |
22
|
|
|
|
|
|
|
|
23
|
4
|
|
|
|
|
7
|
for my $cidr (@$cidrs) { |
24
|
6
|
|
|
|
|
21
|
my($network, $netmask) = split m{/}, $cidr; |
25
|
6
|
|
50
|
|
|
18
|
$netmask ||= 32; |
26
|
6
|
|
|
|
|
972
|
$self->_add($name, $network, $netmask); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub impl { |
31
|
1
|
|
|
1
|
0
|
8198
|
my($self) = @_; |
32
|
1
|
|
|
|
|
6
|
return "XS"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|