line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::Spy::TieHash; |
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use constant PAYLOAD => 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
6
|
1
|
|
|
1
|
|
5
|
use constant CODE => 1; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
935
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub TIEHASH { |
9
|
3
|
|
|
3
|
|
4746
|
my $class = shift @_; |
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
|
|
20
|
return bless [@_], $class; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub FETCH { |
15
|
3
|
|
|
3
|
|
829
|
my ( $self, $key ) = @_; |
16
|
3
|
50
|
|
|
|
13
|
$key = '' unless defined $key; |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
|
|
9
|
my $value = $self->[PAYLOAD]{$key}; |
19
|
|
|
|
|
|
|
|
20
|
3
|
100
|
|
|
|
21
|
my $followup = $self->[CODE] |
21
|
|
|
|
|
|
|
->( "->{$key} -> " . ( defined $value ? $value : 'undef' ) ); |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
21
|
return Devel::Spy->new( $value, $followup ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub STORE { |
27
|
2
|
|
|
2
|
|
1896
|
my ( $self, $key, $value ) = @_; |
28
|
2
|
50
|
|
|
|
10
|
$key = '' unless defined $key; |
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
|
|
7
|
$self->[PAYLOAD]{$key} = $value; |
31
|
|
|
|
|
|
|
|
32
|
2
|
50
|
|
|
|
17
|
my $followup = $self->[CODE] |
33
|
|
|
|
|
|
|
->( "->{$key} = " . ( defined $value ? $value : 'undef' ) ); |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
23
|
return Devel::Spy->new( $value, $followup ); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub DELETE { |
39
|
0
|
|
|
0
|
|
|
my ( $self, $key ) = @_; |
40
|
0
|
0
|
|
|
|
|
$key = '' unless defined $key; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
my $value = delete $self->[PAYLOAD]{$key}; |
43
|
|
|
|
|
|
|
|
44
|
0
|
0
|
|
|
|
|
my $followup = $self->[CODE] |
45
|
|
|
|
|
|
|
->( " delete ->{$key} ->" . ( defined $value ? $value : 'undef' ) ); |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return Devel::Spy->new( $value, $followup ); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub CLEAR { |
51
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
%{ $self->[PAYLOAD] } = (); |
|
0
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
$self->[CODE](' %... = ()'); |
55
|
0
|
|
|
|
|
|
return; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub EXISTS { |
59
|
0
|
|
|
0
|
|
|
my ( $self, $key ) = @_; |
60
|
0
|
0
|
|
|
|
|
$key = '' unless defined $key; |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
my $value = exists $self->[PAYLOAD]{$key}; |
63
|
0
|
0
|
|
|
|
|
my $followup = $self->[CODE](" exists(->{$key}) ->" . ( defined $value ? $value : 'undef' )); |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
return Devel::Spy->new( $value, $followup ); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub FIRSTKEY { |
69
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
70
|
|
|
|
|
|
|
|
71
|
0
|
|
|
|
|
|
keys %{ $self->[PAYLOAD] }; |
|
0
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
my $key = each %{ $self->[PAYLOAD] }; |
|
0
|
|
|
|
|
|
|
73
|
0
|
0
|
|
|
|
|
my $followup = $self->[CODE](" each(%...) ->" . ( defined $key ? $key : 'undef' )); |
74
|
0
|
|
|
|
|
|
return Devel::Spy->new( $key, $followup ); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub NEXTKEY { |
78
|
0
|
|
|
0
|
|
|
my ( $self, undef ) = @_; |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
my $key = each %{ $self->[PAYLOAD] }; |
|
0
|
|
|
|
|
|
|
81
|
0
|
0
|
|
|
|
|
my $followup = $self->[CODE](" each(%...) ->" . ( defined $key ? $key : 'undef' )); |
82
|
0
|
|
|
|
|
|
return Devel::Spy->new( $key, $followup ); |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub SCALAR { |
86
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
87
|
|
|
|
|
|
|
|
88
|
0
|
|
|
|
|
|
my $value = %{ $self->[PAYLOAD] }; |
|
0
|
|
|
|
|
|
|
89
|
0
|
0
|
|
|
|
|
my $followup = $self->[CODE](" scalar(%...) ->" . ( defined $value ? $value : 'undef' )); |
90
|
0
|
|
|
|
|
|
return Devel::Spy->new( $value, $followup ); |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
0
|
|
|
0
|
|
|
sub UNTIE {} |
94
|
0
|
|
|
0
|
|
|
sub DESTROY {} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
1; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
__END__ |