line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Container Class for Validation::Class::Mixin Objects |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Validation::Class::Mixins is a container class for L |
4
|
|
|
|
|
|
|
# objects and is derived from the L class. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Validation::Class::Mixins; |
7
|
|
|
|
|
|
|
|
8
|
109
|
|
|
109
|
|
661
|
use strict; |
|
109
|
|
|
|
|
221
|
|
|
109
|
|
|
|
|
3169
|
|
9
|
109
|
|
|
109
|
|
521
|
use warnings; |
|
109
|
|
|
|
|
197
|
|
|
109
|
|
|
|
|
2928
|
|
10
|
|
|
|
|
|
|
|
11
|
109
|
|
|
109
|
|
532
|
use Validation::Class::Util '!has'; |
|
109
|
|
|
|
|
196
|
|
|
109
|
|
|
|
|
654
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '7.900058'; # VERSION |
14
|
|
|
|
|
|
|
|
15
|
109
|
|
|
109
|
|
610
|
use base 'Validation::Class::Mapping'; |
|
109
|
|
|
|
|
216
|
|
|
109
|
|
|
|
|
11433
|
|
16
|
|
|
|
|
|
|
|
17
|
109
|
|
|
109
|
|
37196
|
use Validation::Class::Mixin; |
|
109
|
|
|
|
|
311
|
|
|
109
|
|
|
|
|
15871
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub add { |
20
|
|
|
|
|
|
|
|
21
|
489
|
|
|
489
|
1
|
14420
|
my $self = shift; |
22
|
|
|
|
|
|
|
|
23
|
489
|
|
|
|
|
1279
|
my $arguments = $self->build_args(@_); |
24
|
|
|
|
|
|
|
|
25
|
489
|
|
|
|
|
915
|
while (my ($key, $value) = each %{$arguments}) { |
|
1534
|
|
|
|
|
3850
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# do not overwrite |
28
|
1045
|
100
|
|
|
|
2273
|
unless (defined $self->{$key}) { |
29
|
1009
|
|
|
|
|
1629
|
$self->{$key} = $value; # accept an object as a value |
30
|
|
|
|
|
|
|
$self->{$key} = Validation::Class::Mixin->new($value) |
31
|
1009
|
100
|
|
|
|
2419
|
unless "Validation::Class::Mixin" eq ref $self->{$key} |
32
|
|
|
|
|
|
|
; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
489
|
|
|
|
|
1184
|
return $self; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |