line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Param::Decorator; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
854
|
use strict; |
|
3
|
|
|
|
|
21
|
|
|
3
|
|
|
|
|
108
|
|
4
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
92
|
|
5
|
3
|
|
|
3
|
|
15
|
use base 'Class::Param::Base'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
461
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTOLOAD; |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
17
|
use Params::Validate qw[]; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1635
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
2
|
50
|
|
2
|
1
|
11
|
my $class = ref $_[0] ? ref shift : shift; |
13
|
2
|
|
|
|
|
75
|
my $self = Params::Validate::validate_with( |
14
|
|
|
|
|
|
|
params => \@_, |
15
|
|
|
|
|
|
|
spec => [ |
16
|
|
|
|
|
|
|
{ |
17
|
|
|
|
|
|
|
type => Params::Validate::OBJECT, |
18
|
|
|
|
|
|
|
isa => 'Class::Param::Base', |
19
|
|
|
|
|
|
|
optional => 0 |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
], |
22
|
|
|
|
|
|
|
called => "$class\::new" |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
2
|
|
|
|
|
25
|
return bless( $self, $class )->initialize(@_); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub initialize { |
29
|
1
|
|
|
1
|
1
|
7
|
return $_[0]; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub decorated { |
33
|
51
|
|
|
51
|
1
|
311
|
return $_[0]->[0]; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
1
|
|
|
1
|
1
|
7
|
sub get { return shift->decorated->get (@_) } |
37
|
0
|
|
|
0
|
1
|
0
|
sub set { return shift->decorated->set (@_) } |
38
|
4
|
|
|
4
|
1
|
13
|
sub has { return shift->decorated->has (@_) } |
39
|
0
|
|
|
0
|
1
|
|
sub count { return shift->decorated->count (@_) } |
40
|
0
|
|
|
0
|
1
|
|
sub clear { return shift->decorated->clear (@_) } |
41
|
0
|
|
|
0
|
1
|
|
sub names { return shift->decorated->names (@_) } |
42
|
0
|
|
|
0
|
1
|
|
sub remove { return shift->decorated->remove (@_) } |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub AUTOLOAD { |
45
|
0
|
|
|
0
|
|
|
my $self = shift; |
46
|
0
|
|
|
|
|
|
my $method = substr( $AUTOLOAD, rindex( $AUTOLOAD, ':' ) + 1 ); |
47
|
0
|
|
|
|
|
|
return $self->decorated->$method(@_); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
0
|
|
|
sub DESTROY { } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |