line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooX::Value::DomainLabel; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
19104
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
57
|
|
4
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
49
|
|
5
|
2
|
|
|
2
|
|
595
|
use Moo; |
|
2
|
|
|
|
|
11099
|
|
|
2
|
|
|
|
|
12
|
|
6
|
2
|
|
|
2
|
|
1908
|
use namespace::clean; |
|
2
|
|
|
|
|
9100
|
|
|
2
|
|
|
|
|
43
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
718
|
use MooX::Value::ValidationUtils; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
268
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends 'MooX::Value'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _why_invalid |
15
|
|
|
|
|
|
|
{ |
16
|
9
|
|
|
9
|
|
12
|
my ($self, $value) = @_; |
17
|
9
|
|
|
|
|
21
|
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
|
|
|
|
|
11
|
return; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new_canonical |
23
|
|
|
|
|
|
|
{ |
24
|
2
|
|
|
2
|
1
|
1641
|
my ($class, $value) = @_; |
25
|
2
|
|
|
|
|
5
|
$value =~ tr/A-Z/a-z/; |
26
|
2
|
|
|
|
|
46
|
return $class->new( $value ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |