line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Zonemaster::Engine::Net::IP; |
2
|
|
|
|
|
|
|
|
3
|
26
|
|
|
26
|
|
45656
|
use version; our $VERSION = version->declare("v0.0.6"); |
|
26
|
|
|
|
|
1437
|
|
|
26
|
|
|
|
|
174
|
|
4
|
|
|
|
|
|
|
|
5
|
26
|
|
|
26
|
|
2442
|
no strict 'refs'; |
|
26
|
|
|
|
|
58
|
|
|
26
|
|
|
|
|
770
|
|
6
|
26
|
|
|
26
|
|
146
|
use warnings; |
|
26
|
|
|
|
|
52
|
|
|
26
|
|
|
|
|
859
|
|
7
|
|
|
|
|
|
|
|
8
|
26
|
|
|
26
|
|
131
|
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
|
26
|
|
|
|
|
50
|
|
|
26
|
|
|
|
|
2582
|
|
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
|
|
11527
|
use Net::IP qw(:PROC); |
|
26
|
|
|
|
|
1142276
|
|
|
26
|
|
|
|
|
11736
|
|
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
|
338091
|
|
|
338091
|
1
|
800587
|
my ($class) = shift @_; |
38
|
338091
|
|
|
|
|
654993
|
my $self = {}; |
39
|
338091
|
|
|
|
|
1200260
|
$self = $class->SUPER::new( @_ ); |
40
|
338091
|
|
|
|
|
354251817
|
bless($self, $class); |
41
|
338091
|
|
|
|
|
1941782
|
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 |