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
|
108
|
|
|
108
|
|
582
|
use strict; |
|
108
|
|
|
|
|
203
|
|
|
108
|
|
|
|
|
2693
|
|
10
|
108
|
|
|
108
|
|
513
|
use warnings; |
|
108
|
|
|
|
|
211
|
|
|
108
|
|
|
|
|
3050
|
|
11
|
|
|
|
|
|
|
|
12
|
108
|
|
|
108
|
|
546
|
use Validation::Class::Util '!has', '!hold'; |
|
108
|
|
|
|
|
202
|
|
|
108
|
|
|
|
|
984
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '7.900057'; # VERSION |
15
|
|
|
|
|
|
|
|
16
|
108
|
|
|
108
|
|
566
|
use base 'Validation::Class::Listing'; |
|
108
|
|
|
|
|
205
|
|
|
108
|
|
|
|
|
23340
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub add { |
19
|
|
|
|
|
|
|
|
20
|
2654
|
|
|
2654
|
1
|
3789
|
my $self = shift; |
21
|
|
|
|
|
|
|
|
22
|
2654
|
100
|
|
|
|
7055
|
my $arguments = isa_arrayref($_[0]) ? $_[0] : [@_]; |
23
|
|
|
|
|
|
|
|
24
|
2654
|
|
|
|
|
3739
|
push @{$self}, @{$arguments}; |
|
2654
|
|
|
|
|
4544
|
|
|
2654
|
|
|
|
|
4007
|
|
25
|
|
|
|
|
|
|
|
26
|
2654
|
|
|
|
|
8300
|
@{$self} = ($self->unique); |
|
2654
|
|
|
|
|
4675
|
|
27
|
|
|
|
|
|
|
|
28
|
2654
|
|
|
|
|
7340
|
return $self; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub to_string { |
33
|
|
|
|
|
|
|
|
34
|
36
|
|
|
36
|
0
|
82
|
my ($self, $delimiter, $transformer) = @_; |
35
|
|
|
|
|
|
|
|
36
|
36
|
50
|
|
|
|
179
|
$delimiter = ', ' unless defined $delimiter; # default is a comma-space |
37
|
|
|
|
|
|
|
|
38
|
36
|
50
|
|
|
|
113
|
$self->each($transformer) if $transformer; |
39
|
|
|
|
|
|
|
|
40
|
36
|
|
|
|
|
262
|
return $self->join($delimiter); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |