line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Zonemaster::Engine::Net::IP; |
2
|
|
|
|
|
|
|
|
3
|
26
|
|
|
26
|
|
46851
|
use version; our $VERSION = version->declare("v0.0.6"); |
|
26
|
|
|
|
|
1453
|
|
|
26
|
|
|
|
|
185
|
|
4
|
|
|
|
|
|
|
|
5
|
26
|
|
|
26
|
|
2289
|
no strict 'refs'; |
|
26
|
|
|
|
|
57
|
|
|
26
|
|
|
|
|
754
|
|
6
|
26
|
|
|
26
|
|
128
|
use warnings; |
|
26
|
|
|
|
|
52
|
|
|
26
|
|
|
|
|
851
|
|
7
|
|
|
|
|
|
|
|
8
|
26
|
|
|
26
|
|
140
|
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
|
26
|
|
|
|
|
47
|
|
|
26
|
|
|
|
|
2632
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require Exporter; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $p_class; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
eval { |
17
|
|
|
|
|
|
|
# Still does not work that way... |
18
|
|
|
|
|
|
|
# require Net::IP::XS; |
19
|
|
|
|
|
|
|
# use Net::IP::XS qw(:PROC); |
20
|
|
|
|
|
|
|
# $p_class = q{Net::IP::XS}; |
21
|
|
|
|
|
|
|
0; |
22
|
|
|
|
|
|
|
} or do { |
23
|
|
|
|
|
|
|
require Net::IP; |
24
|
26
|
|
|
26
|
|
11794
|
use Net::IP qw(:PROC); |
|
26
|
|
|
|
|
1191432
|
|
|
26
|
|
|
|
|
11935
|
|
25
|
|
|
|
|
|
|
$p_class = q{Net::IP}; |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
if ( $p_class ) { |
29
|
|
|
|
|
|
|
push @ISA, ( $p_class ); |
30
|
|
|
|
|
|
|
push @EXPORT_OK, @{ $p_class . '::EXPORT_OK' }; |
31
|
|
|
|
|
|
|
%EXPORT_TAGS = (PROC => [@EXPORT_OK],); |
32
|
|
|
|
|
|
|
} else { |
33
|
|
|
|
|
|
|
die "Both Net::IP and Net::IP::XS missing ?\n"; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub new { |
37
|
338095
|
|
|
338095
|
1
|
823993
|
my ($class) = shift @_; |
38
|
338095
|
|
|
|
|
642037
|
my $self = {}; |
39
|
338095
|
|
|
|
|
1147891
|
$self = $class->SUPER::new( @_ ); |
40
|
338095
|
|
|
|
|
360999557
|
bless($self, $class); |
41
|
338095
|
|
|
|
|
1818511
|
return $self; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 NAME |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Zonemaster::Engine::Net::IP - Net::IP/Net::IP::XS Wrapper (STILL EXPERIMENTAL) |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SYNOPSIS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
my $ip = Zonemaster::Engine::Net::IP->new( q{0.0.0.0/8} ); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 METHODS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=over |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item new |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Constructor of object. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=back |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |