line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::TinyIp::Address::v6; |
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
56
|
|
4
|
1
|
|
|
1
|
|
4
|
use base "Net::TinyIp::Address"; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
97
|
|
5
|
1
|
|
|
1
|
|
5
|
use Readonly; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
217
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Readonly our $VERSION => 6; |
8
|
|
|
|
|
|
|
Readonly our $BITS_PER_BLOCK => 16; |
9
|
|
|
|
|
|
|
Readonly our $BLOCK_LENGTH => 8; |
10
|
|
|
|
|
|
|
Readonly our $BITS_LENGTH => $BITS_PER_BLOCK * $BLOCK_LENGTH; |
11
|
|
|
|
|
|
|
Readonly our $SEPARATOR => q{:}; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $BLOCK_FORMAT = q{%04x}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub from_string { |
16
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
17
|
0
|
|
|
|
|
|
my $str = shift; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
return $class->from_hex( join q{}, q{0x}, map { $_ } split m{[$SEPARATOR]}, $str ); |
|
0
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|