File Coverage

blib/lib/Net/TinyIp/Address/v6.pm
Criterion Covered Total %
statement 12 16 75.0
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 22 72.7


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