line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooX::Value::DomainLabel; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
16224
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
57
|
|
4
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
49
|
|
5
|
2
|
|
|
2
|
|
410
|
use Moo; |
|
2
|
|
|
|
|
9831
|
|
|
2
|
|
|
|
|
12
|
|
6
|
2
|
|
|
2
|
|
1600
|
use namespace::clean; |
|
2
|
|
|
|
|
7864
|
|
|
2
|
|
|
|
|
9
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
612
|
use MooX::Value::ValidationUtils; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
231
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends 'MooX::Value'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _why_invalid |
15
|
|
|
|
|
|
|
{ |
16
|
9
|
|
|
9
|
|
8
|
my ($self, $value) = @_; |
17
|
9
|
|
|
|
|
18
|
my ($why, $long, $data) = MooX::Value::ValidationUtils::why_invalid_domain_label( $value ); |
18
|
9
|
100
|
|
|
|
23
|
return ( __PACKAGE__ . ": $why", $long, $data ) if defined $why; |
19
|
6
|
|
|
|
|
8
|
return; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new_canonical |
23
|
|
|
|
|
|
|
{ |
24
|
2
|
|
|
2
|
1
|
894
|
my ($class, $value) = @_; |
25
|
2
|
|
|
|
|
4
|
$value =~ tr/A-Z/a-z/; |
26
|
2
|
|
|
|
|
36
|
return $class->new( $value ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |