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
|
|
803
|
use strict; |
|
109
|
|
|
|
|
297
|
|
|
109
|
|
|
|
|
3674
|
|
9
|
109
|
|
|
109
|
|
609
|
use warnings; |
|
109
|
|
|
|
|
307
|
|
|
109
|
|
|
|
|
3232
|
|
10
|
|
|
|
|
|
|
|
11
|
109
|
|
|
109
|
|
645
|
use Validation::Class::Util '!has'; |
|
109
|
|
|
|
|
258
|
|
|
109
|
|
|
|
|
699
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '7.900059'; # VERSION |
14
|
|
|
|
|
|
|
|
15
|
109
|
|
|
109
|
|
721
|
use base 'Validation::Class::Mapping'; |
|
109
|
|
|
|
|
253
|
|
|
109
|
|
|
|
|
12329
|
|
16
|
|
|
|
|
|
|
|
17
|
109
|
|
|
109
|
|
47185
|
use Validation::Class::Mixin; |
|
109
|
|
|
|
|
357
|
|
|
109
|
|
|
|
|
16834
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub add { |
20
|
|
|
|
|
|
|
|
21
|
489
|
|
|
489
|
1
|
18009
|
my $self = shift; |
22
|
|
|
|
|
|
|
|
23
|
489
|
|
|
|
|
1538
|
my $arguments = $self->build_args(@_); |
24
|
|
|
|
|
|
|
|
25
|
489
|
|
|
|
|
1566
|
while (my ($key, $value) = each %{$arguments}) { |
|
1534
|
|
|
|
|
4681
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# do not overwrite |
28
|
1045
|
100
|
|
|
|
2743
|
unless (defined $self->{$key}) { |
29
|
1009
|
|
|
|
|
1820
|
$self->{$key} = $value; # accept an object as a value |
30
|
|
|
|
|
|
|
$self->{$key} = Validation::Class::Mixin->new($value) |
31
|
1009
|
100
|
|
|
|
2905
|
unless "Validation::Class::Mixin" eq ref $self->{$key} |
32
|
|
|
|
|
|
|
; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
489
|
|
|
|
|
1606
|
return $self; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |