line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Value::Object::HexString; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
25798
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
49
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
50
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
698
|
use parent 'Value::Object'; |
|
2
|
|
|
|
|
306
|
|
|
2
|
|
|
|
|
9
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.15'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _why_invalid |
11
|
|
|
|
|
|
|
{ |
12
|
7
|
|
|
7
|
|
10
|
my ( $self, $value ) = @_; |
13
|
7
|
100
|
|
|
|
26
|
return ( ref($self) . ': value is undefined', '', undef ) unless defined $value; |
14
|
6
|
100
|
|
|
|
21
|
return ( ref($self) . ': value is empty', '', undef ) unless length $value; |
15
|
5
|
100
|
|
|
|
37
|
return ( ref($self) . ': value format is incorrect', '', $value ) unless $value =~ m/\A[0-9a-fA-F]+\z/; |
16
|
4
|
|
|
|
|
12
|
return; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new_canonical |
20
|
|
|
|
|
|
|
{ |
21
|
1
|
|
|
1
|
1
|
1883
|
my ($class, $value) = @_; |
22
|
1
|
|
|
|
|
6
|
$value =~ tr/A-F/a-f/; |
23
|
1
|
|
|
|
|
5
|
return $class->new( $value ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
__END__ |