line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Validator::Role::NoThrow; |
2
|
2
|
|
|
2
|
|
2275
|
use Mouse::Role; |
|
2
|
|
|
|
|
1238
|
|
|
2
|
|
|
|
|
12
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
has errors => ( |
5
|
|
|
|
|
|
|
is => 'rw', |
6
|
|
|
|
|
|
|
isa => 'ArrayRef', |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
required => 0, |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
predicate => 'has_errors', |
11
|
|
|
|
|
|
|
clearer => 'clear_errors', |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
around unknown_parameters => sub { |
15
|
|
|
|
|
|
|
my($next, $self, $rules, $args) = @_; |
16
|
|
|
|
|
|
|
my %unknowns = $self->$next($rules, $args); |
17
|
|
|
|
|
|
|
while(my($k, $v) = each %unknowns) { |
18
|
|
|
|
|
|
|
$args->{$k} = $v; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
return %unknowns; |
21
|
|
|
|
|
|
|
}; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
around found_errors => sub { |
24
|
|
|
|
|
|
|
my($next, $self, $args, @errors) = @_; |
25
|
|
|
|
|
|
|
$self->errors(\@errors); |
26
|
|
|
|
|
|
|
return $args; |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
2
|
|
|
2
|
|
825
|
no Mouse::Role; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
9
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
__END__ |