line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooX::Value::DomainLabel; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
21885
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
59
|
|
4
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
51
|
|
5
|
2
|
|
|
2
|
|
524
|
use Moo; |
|
2
|
|
|
|
|
11574
|
|
|
2
|
|
|
|
|
10
|
|
6
|
2
|
|
|
2
|
|
1980
|
use namespace::clean; |
|
2
|
|
|
|
|
9478
|
|
|
2
|
|
|
|
|
12
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
788
|
use MooX::Value::ValidationUtils; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
283
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends 'MooX::Value'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _why_invalid |
15
|
|
|
|
|
|
|
{ |
16
|
9
|
|
|
9
|
|
12
|
my ($self, $value) = @_; |
17
|
9
|
|
|
|
|
26
|
my ($why, $long, $data) = MooX::Value::ValidationUtils::why_invalid_domain_label( $value ); |
18
|
9
|
100
|
|
|
|
27
|
return ( __PACKAGE__ . ": $why", $long, $data ) if defined $why; |
19
|
6
|
|
|
|
|
10
|
return; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new_canonical |
23
|
|
|
|
|
|
|
{ |
24
|
2
|
|
|
2
|
1
|
1507
|
my ($class, $value) = @_; |
25
|
2
|
|
|
|
|
4
|
$value =~ tr/A-Z/a-z/; |
26
|
2
|
|
|
|
|
46
|
return $class->new( $value ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |