line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Exception::ValidationFailedForInlineTypeConstraint; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2206'; |
3
|
|
|
|
|
|
|
|
4
|
30
|
|
|
30
|
|
20352
|
use Moose; |
|
30
|
|
|
|
|
80
|
|
|
30
|
|
|
|
|
289
|
|
5
|
|
|
|
|
|
|
extends 'Moose::Exception'; |
6
|
|
|
|
|
|
|
with 'Moose::Exception::Role::Class'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has 'type_constraint_message' => ( |
9
|
|
|
|
|
|
|
is => 'ro', |
10
|
|
|
|
|
|
|
isa => 'Str', |
11
|
|
|
|
|
|
|
required => 1 |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has 'attribute_name' => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
isa => 'Str', |
17
|
|
|
|
|
|
|
required => 1 |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has 'value' => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
isa => 'Any', |
23
|
|
|
|
|
|
|
required => 1 |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has 'new_member' => ( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
isa => 'Bool', |
29
|
|
|
|
|
|
|
default => 0, |
30
|
|
|
|
|
|
|
predicate => 'is_a_new_member' |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _build_message { |
34
|
1009
|
|
|
1009
|
|
1850
|
my $self = shift; |
35
|
|
|
|
|
|
|
|
36
|
1009
|
|
|
|
|
1471
|
my $line1; |
37
|
|
|
|
|
|
|
|
38
|
1009
|
100
|
|
|
|
34263
|
if( $self->new_member ) { |
39
|
907
|
|
|
|
|
30008
|
$line1 = "A new member value for ".$self->attribute_name." does not pass its type constraint because: " |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
else { |
42
|
102
|
|
|
|
|
3982
|
$line1 = "Attribute (".$self->attribute_name.") does not pass the type constraint because: "; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
1009
|
|
|
|
|
35794
|
return $line1 . $self->type_constraint_message; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
49
|
|
|
|
|
|
|
1; |