line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Param::Tie; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
3721
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
78
|
|
4
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
67
|
|
5
|
2
|
|
|
2
|
|
12
|
use base 'Class::Param::Decorator'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1037
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub initialize { |
8
|
1
|
|
|
1
|
1
|
3
|
my ( $instance, $decorated ) = @_; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
|
|
3
|
my $class = ref($instance); |
11
|
1
|
|
|
|
|
4
|
my $self = {}; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
3
|
tie( %{ $self }, 'Class::Param::Tie::Param', $decorated ); |
|
1
|
|
|
|
|
10
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
13
|
return bless( $self, $class ); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
9
|
|
|
9
|
1
|
16
|
sub decorated { return tied( %{ shift() } )->decorated (@_) } |
|
9
|
|
|
|
|
52
|
|
19
|
4
|
|
|
4
|
1
|
14
|
sub add { return shift->decorated->add (@_) } |
20
|
1
|
|
|
1
|
1
|
5
|
sub count { return shift->decorated->count (@_) } |
21
|
3
|
|
|
3
|
1
|
10
|
sub param { return shift->decorated->param (@_) } |
22
|
0
|
|
|
0
|
1
|
0
|
sub scan { return shift->decorated->scan (@_) } |
23
|
0
|
|
|
0
|
1
|
0
|
sub as_hash { return shift->decorated->as_hash (@_) } |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
package Class::Param::Tie::Param; |
26
|
|
|
|
|
|
|
|
27
|
2
|
|
|
2
|
|
15
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
67
|
|
28
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
109
|
|
29
|
2
|
|
|
2
|
|
11
|
use base 'Class::Param::Decorator'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1405
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub iterator { |
32
|
21
|
|
100
|
21
|
|
116
|
return $_[0]->[1] ||= []; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub TIEHASH { |
36
|
1
|
|
|
1
|
|
12
|
return shift->new(@_); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub FETCH { |
40
|
21
|
|
|
21
|
|
145
|
my ( $self, $name ) = @_; |
41
|
21
|
|
|
|
|
59
|
return $self->decorated->get($name); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub STORE { |
45
|
2
|
|
|
2
|
|
6
|
my ( $self, $name, $value ) = @_; |
46
|
2
|
|
|
|
|
8
|
return $self->decorated->set( $name, $value ); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub DELETE { |
50
|
1
|
|
|
1
|
|
3
|
my ( $self, $name ) = @_; |
51
|
1
|
|
|
|
|
6
|
return $self->decorated->remove($name); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub EXISTS { |
55
|
2
|
|
|
2
|
|
6
|
my ( $self, $name ) = @_; |
56
|
2
|
|
|
|
|
7
|
return $self->decorated->has($name); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub SCALAR { |
60
|
1
|
|
|
1
|
|
3
|
my ( $self ) = @_; |
61
|
1
|
|
|
|
|
4
|
return $self->decorated->count; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub FIRSTKEY { |
65
|
3
|
|
|
3
|
|
7
|
my ( $self ) = @_; |
66
|
3
|
|
|
|
|
11
|
@{ $self->iterator } = $self->decorated->names; |
|
3
|
|
|
|
|
9
|
|
67
|
3
|
|
|
|
|
4
|
return shift @{ $self->iterator }; |
|
3
|
|
|
|
|
8
|
|
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub NEXTKEY { |
71
|
15
|
|
|
15
|
|
24
|
my ( $self, $last ) = @_; |
72
|
15
|
|
|
|
|
16
|
return shift @{ $self->iterator }; |
|
15
|
|
|
|
|
23
|
|
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
__END__ |