line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
12954
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
58
|
|
2
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
122
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package MooseX::Attribute::ValidateWithException::Exception; |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
2
|
|
|
2
|
|
48
|
$MooseX::Attribute::ValidateWithException::Exception::AUTHORITY = 'cpan:KENTNL'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
{ |
9
|
|
|
|
|
|
|
$MooseX::Attribute::ValidateWithException::Exception::VERSION = '0.3.0'; # TRIAL |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# ABSTRACT: An Exception object to represent "Normal" moose validation failures. |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
434
|
use Moose; |
|
2
|
|
|
|
|
302437
|
|
|
2
|
|
|
|
|
13
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#with 'StackTrace::Auto'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
extends 'Throwable::Error'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has 'attribute_name' => ( |
21
|
|
|
|
|
|
|
isa => 'Str', |
22
|
|
|
|
|
|
|
required => 1, |
23
|
|
|
|
|
|
|
is => 'ro', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has 'data' => ( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
required => 1, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has 'constraint_message' => ( |
32
|
|
|
|
|
|
|
is => 'ro', |
33
|
|
|
|
|
|
|
required => 1, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# has 'constraint' => ( |
37
|
|
|
|
|
|
|
# is => 'ro', |
38
|
|
|
|
|
|
|
# required => 1, |
39
|
|
|
|
|
|
|
#); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
has 'constraint_name' => ( |
42
|
|
|
|
|
|
|
isa => 'Str', |
43
|
|
|
|
|
|
|
is => 'ro', |
44
|
|
|
|
|
|
|
required => 1, |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
has message => ( |
48
|
|
|
|
|
|
|
isa => 'Str', |
49
|
|
|
|
|
|
|
is => 'ro', |
50
|
|
|
|
|
|
|
lazy => 1, |
51
|
|
|
|
|
|
|
builder => '_generate_message', |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub _generate_message { |
55
|
1
|
|
|
1
|
|
2
|
my ($self) = shift; |
56
|
1
|
|
|
|
|
35
|
return sprintf 'Attribute (%s) does not pass the type constraint because: %s', $self->attribute_name, $self->constraint_message; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
#with 'StackTrace::Auto'; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable( inline_constructor => 0 ); |
62
|
2
|
|
|
2
|
|
9525
|
no Moose; |
|
2
|
|
|
|
|
21
|
|
|
2
|
|
|
|
|
8
|
|
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=pod |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=encoding UTF-8 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 NAME |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
MooseX::Attribute::ValidateWithException::Exception - An Exception object to represent "Normal" moose validation failures. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 VERSION |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
version 0.3.0 |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 AUTHOR |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Kent Fredric <kentnl@cpan.org> |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This software is copyright (c) 2013 by Kent Fredric <kentnl@cpan.org>. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
88
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=cut |