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