line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Error Handling Object for Fields and Classes |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Validation::Class::Errors is responsible for error handling in |
4
|
|
|
|
|
|
|
# Validation::Class derived classes on both the class and field levels |
5
|
|
|
|
|
|
|
# respectively and is derived from the L class. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Validation::Class::Errors; |
8
|
|
|
|
|
|
|
|
9
|
109
|
|
|
109
|
|
633
|
use strict; |
|
109
|
|
|
|
|
210
|
|
|
109
|
|
|
|
|
2656
|
|
10
|
109
|
|
|
109
|
|
470
|
use warnings; |
|
109
|
|
|
|
|
187
|
|
|
109
|
|
|
|
|
2614
|
|
11
|
|
|
|
|
|
|
|
12
|
109
|
|
|
109
|
|
527
|
use Validation::Class::Util '!has', '!hold'; |
|
109
|
|
|
|
|
197
|
|
|
109
|
|
|
|
|
672
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '7.900058'; # VERSION |
15
|
|
|
|
|
|
|
|
16
|
109
|
|
|
109
|
|
630
|
use base 'Validation::Class::Listing'; |
|
109
|
|
|
|
|
192
|
|
|
109
|
|
|
|
|
23468
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub add { |
19
|
|
|
|
|
|
|
|
20
|
2697
|
|
|
2697
|
1
|
3561
|
my $self = shift; |
21
|
|
|
|
|
|
|
|
22
|
2697
|
100
|
|
|
|
4976
|
my $arguments = isa_arrayref($_[0]) ? $_[0] : [@_]; |
23
|
|
|
|
|
|
|
|
24
|
2697
|
|
|
|
|
3585
|
push @{$self}, @{$arguments}; |
|
2697
|
|
|
|
|
3780
|
|
|
2697
|
|
|
|
|
3709
|
|
25
|
|
|
|
|
|
|
|
26
|
2697
|
|
|
|
|
5843
|
@{$self} = ($self->unique); |
|
2697
|
|
|
|
|
3870
|
|
27
|
|
|
|
|
|
|
|
28
|
2697
|
|
|
|
|
4402
|
return $self; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub to_string { |
33
|
|
|
|
|
|
|
|
34
|
36
|
|
|
36
|
0
|
90
|
my ($self, $delimiter, $transformer) = @_; |
35
|
|
|
|
|
|
|
|
36
|
36
|
50
|
|
|
|
137
|
$delimiter = ', ' unless defined $delimiter; # default is a comma-space |
37
|
|
|
|
|
|
|
|
38
|
36
|
50
|
|
|
|
89
|
$self->each($transformer) if $transformer; |
39
|
|
|
|
|
|
|
|
40
|
36
|
|
|
|
|
211
|
return $self->join($delimiter); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |