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
|
108
|
|
|
108
|
|
532
|
use strict; |
|
108
|
|
|
|
|
209
|
|
|
108
|
|
|
|
|
2928
|
|
9
|
108
|
|
|
108
|
|
535
|
use warnings; |
|
108
|
|
|
|
|
201
|
|
|
108
|
|
|
|
|
3050
|
|
10
|
|
|
|
|
|
|
|
11
|
108
|
|
|
108
|
|
535
|
use Validation::Class::Util '!has'; |
|
108
|
|
|
|
|
204
|
|
|
108
|
|
|
|
|
792
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '7.900057'; # VERSION |
14
|
|
|
|
|
|
|
|
15
|
108
|
|
|
108
|
|
571
|
use base 'Validation::Class::Mapping'; |
|
108
|
|
|
|
|
200
|
|
|
108
|
|
|
|
|
8074
|
|
16
|
|
|
|
|
|
|
|
17
|
108
|
|
|
108
|
|
57951
|
use Validation::Class::Mixin; |
|
108
|
|
|
|
|
306
|
|
|
108
|
|
|
|
|
16272
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub add { |
20
|
|
|
|
|
|
|
|
21
|
482
|
|
|
482
|
1
|
8687
|
my $self = shift; |
22
|
|
|
|
|
|
|
|
23
|
482
|
|
|
|
|
1616
|
my $arguments = $self->build_args(@_); |
24
|
|
|
|
|
|
|
|
25
|
482
|
|
|
|
|
977
|
while (my ($key, $value) = each %{$arguments}) { |
|
1512
|
|
|
|
|
4848
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# do not overwrite |
28
|
1030
|
100
|
|
|
|
3334
|
unless (defined $self->{$key}) { |
29
|
997
|
|
|
|
|
1653
|
$self->{$key} = $value; # accept an object as a value |
30
|
|
|
|
|
|
|
$self->{$key} = Validation::Class::Mixin->new($value) |
31
|
997
|
100
|
|
|
|
3444
|
unless "Validation::Class::Mixin" eq ref $self->{$key} |
32
|
|
|
|
|
|
|
; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
482
|
|
|
|
|
1575
|
return $self; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |