line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
6
|
|
|
6
|
|
25459
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
212
|
|
2
|
6
|
|
|
6
|
|
33
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
242
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Package::Debug::Object; |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
6
|
|
|
6
|
|
16966
|
$Package::Debug::Object::AUTHORITY = 'cpan:KENTNL'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
{ |
9
|
|
|
|
|
|
|
$Package::Debug::Object::VERSION = '0.2.2'; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# ABSTRACT: Object oriented guts to Package::Debug |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my %env_key_styles = ( default => 'env_key_from_package', ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my %env_key_prefix_styles = ( default => 'env_key_prefix_from_package', ); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my %log_prefix_styles = ( |
22
|
|
|
|
|
|
|
short => 'log_prefix_from_package_short', |
23
|
|
|
|
|
|
|
long => 'log_prefix_from_package_long', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %debug_styles = ( |
28
|
|
|
|
|
|
|
'prefixed_lines' => 'debug_prefixed_lines', |
29
|
|
|
|
|
|
|
'verbatim' => 'debug_verbtaim', |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub new { |
34
|
6
|
|
|
6
|
1
|
166
|
my ( $self, %args ) = @_; |
35
|
6
|
|
|
|
|
36
|
return bless \%args, $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub debug_style { |
40
|
7
|
100
|
|
7
|
1
|
1289
|
return $_[0]->{debug_style} if exists $_[0]->{debug_style}; |
41
|
6
|
|
|
|
|
20
|
return ( $_[0]->{debug_style} = 'prefixed_lines' ); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub set_debug_style { |
45
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{debug_style} = $_[1]; |
46
|
0
|
|
|
|
|
0
|
return $_[0]; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub env_key_aliases { |
51
|
7
|
100
|
|
7
|
1
|
1164
|
return $_[0]->{env_key_aliases} if exists $_[0]->{env_key_aliases}; |
52
|
6
|
|
|
|
|
1438
|
return ( $_[0]->{env_key_aliases} = [] ); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub set_env_key_aliases { |
56
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{env_key_aliases} = $_[1]; |
57
|
0
|
|
|
|
|
0
|
return $_[0]; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub env_key_prefix_style { |
62
|
7
|
100
|
|
7
|
1
|
606
|
return $_[0]->{env_key_prefix_style} if exists $_[0]->{env_key_prefix_style}; |
63
|
6
|
|
|
|
|
19
|
return ( $_[0]->{env_key_prefix_style} = 'default' ); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub set_env_key_prefix_style { |
67
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{env_key_prefix_style} = $_[1]; |
68
|
0
|
|
|
|
|
0
|
return $_[0]; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub env_key_style { |
73
|
7
|
100
|
|
7
|
1
|
448
|
return $_[0]->{env_key_style} if exists $_[0]->{env_key_style}; |
74
|
6
|
|
|
|
|
19
|
return ( $_[0]->{env_key_style} = 'default' ); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub set_env_key_style { |
78
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{env_key_style} = $_[1]; |
79
|
0
|
|
|
|
|
0
|
return $_[0]; |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub into { |
84
|
22
|
50
|
|
22
|
1
|
635
|
return $_[0]->{into} if exists $_[0]->{into}; |
85
|
0
|
|
|
|
|
0
|
die 'Cannot vivify ->into automatically, pass to constructor or ->set_into() or ->auto_set_into()'; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub set_into { |
89
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{into} = $_[1]; |
90
|
0
|
|
|
|
|
0
|
return $_[0]; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub into_level { |
95
|
7
|
100
|
|
7
|
1
|
493
|
return $_[0]->{into_level} if exists $_[0]->{into_level}; |
96
|
6
|
|
|
|
|
89
|
return ( $_[0]->{into_level} = 0 ); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub set_into_level { |
100
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{into_level} = $_[1]; |
101
|
0
|
|
|
|
|
0
|
return $_[0]; |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
sub sub_name { |
106
|
13
|
100
|
|
13
|
1
|
562
|
return $_[0]->{sub_name} if exists $_[0]->{sub_name}; |
107
|
6
|
|
|
|
|
37
|
return ( $_[0]->{sub_name} = 'DEBUG' ); |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
sub set_sub_name { |
111
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{sub_name} = $_[1]; |
112
|
0
|
|
|
|
|
0
|
return $_[0]; |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
sub value_name { |
117
|
13
|
100
|
|
13
|
1
|
732
|
return $_[0]->{value_name} if exists $_[0]->{value_name}; |
118
|
6
|
|
|
|
|
21
|
return ( $_[0]->{value_name} = 'DEBUG' ); |
119
|
|
|
|
|
|
|
} |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
sub set_value_name { |
122
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{value_name} = $_[1]; |
123
|
0
|
|
|
|
|
0
|
return $_[0]; |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub env_key { |
128
|
7
|
100
|
|
7
|
1
|
494
|
return $_[0]->{env_key} if exists $_[0]->{env_key}; |
129
|
6
|
|
|
|
|
22
|
my $style = $_[0]->env_key_style; |
130
|
6
|
50
|
|
|
|
27
|
if ( not exists $env_key_styles{$style} ) { |
131
|
0
|
|
|
|
|
0
|
die "No such env_key_style $style, options are @{ keys %env_key_styles }"; |
|
0
|
|
|
|
|
0
|
|
132
|
|
|
|
|
|
|
} |
133
|
6
|
|
|
|
|
17
|
my $method = $env_key_styles{$style}; |
134
|
6
|
|
|
|
|
26
|
return ( $_[0]->{env_key} = $_[0]->$method() ); |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub set_env_key { |
138
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{env_key} = $_[1]; |
139
|
0
|
|
|
|
|
0
|
return $_[0]; |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
sub env_key_prefix { |
144
|
8
|
100
|
|
8
|
1
|
441
|
return $_[0]->{env_key_prefix} if exists $_[0]->{env_key_prefix}; |
145
|
6
|
|
|
|
|
23
|
my $style = $_[0]->env_key_prefix_style; |
146
|
6
|
50
|
|
|
|
30
|
if ( not exists $env_key_prefix_styles{$style} ) { |
147
|
0
|
|
|
|
|
0
|
die "No such env_key_prefix_style $style, options are @{ keys %env_key_prefix_styles }"; |
|
0
|
|
|
|
|
0
|
|
148
|
|
|
|
|
|
|
} |
149
|
6
|
|
|
|
|
14
|
my $method = $env_key_prefix_styles{$style}; |
150
|
6
|
|
|
|
|
23
|
return ( $_[0]->{env_key_prefix} = $_[0]->$method() ); |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
sub set_env_key_prefix { |
154
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{env_key_prefix} = $_[1]; |
155
|
0
|
|
|
|
|
0
|
return $_[0]; |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
sub debug_sub { |
160
|
7
|
100
|
|
7
|
1
|
780
|
return $_[0]->{debug_sub} if exists $_[0]->{debug_sub}; |
161
|
6
|
|
|
|
|
28
|
my $style = $_[0]->debug_style; |
162
|
6
|
50
|
|
|
|
48
|
if ( not exists $debug_styles{$style} ) { |
163
|
0
|
|
|
|
|
0
|
die "No such debug_style $style, options are @{ keys %debug_styles }"; |
|
0
|
|
|
|
|
0
|
|
164
|
|
|
|
|
|
|
} |
165
|
6
|
|
|
|
|
52
|
my $method = $debug_styles{$style}; |
166
|
6
|
|
|
|
|
69
|
return ( $_[0]->{debug_sub} = $_[0]->$method() ); |
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
sub set_debug_sub { |
170
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{debug_sub} = $_[1]; |
171
|
0
|
|
|
|
|
0
|
return $_[0]; |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
sub log_prefix_style { |
176
|
7
|
100
|
|
7
|
1
|
423
|
return $_[0]->{log_prefix_style} if exists $_[0]->{log_prefix_style}; |
177
|
6
|
|
|
|
|
12
|
my $style = 'short'; |
178
|
6
|
100
|
|
|
|
28
|
$style = $ENV{PACKAGE_DEBUG_LOG_PREFIX_STYLE} if $ENV{PACKAGE_DEBUG_LOG_PREFIX_STYLE}; |
179
|
6
|
|
|
|
|
20
|
return ( $_[0]->{log_prefix_style} = $style ); |
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
sub set_log_prefix_style { |
183
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{log_prefix_style} = $_[1]; |
184
|
0
|
|
|
|
|
0
|
return $_[0]; |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
sub log_prefix { |
189
|
8
|
100
|
|
8
|
1
|
438
|
return $_[0]->{log_prefix} if exists $_[0]->{log_prefix}; |
190
|
6
|
|
|
|
|
27
|
my $style = $_[0]->log_prefix_style; |
191
|
6
|
50
|
|
|
|
38
|
if ( not exists $log_prefix_styles{$style} ) { |
192
|
0
|
|
|
|
|
0
|
die "Unknown prefix style $style, should be one of @{ keys %log_prefix_styles }"; |
|
0
|
|
|
|
|
0
|
|
193
|
|
|
|
|
|
|
} |
194
|
6
|
|
|
|
|
17
|
my $method = $log_prefix_styles{$style}; |
195
|
6
|
|
|
|
|
31
|
return ( $_[0]->{log_prefix} = $_[0]->$method() ); |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
sub set_log_prefix { |
199
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{log_prefix} = $_[1]; |
200
|
0
|
|
|
|
|
0
|
return $_[0]; |
201
|
|
|
|
|
|
|
} |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
sub is_env_debugging { |
205
|
13
|
100
|
|
13
|
1
|
770
|
return $_[0]->{is_env_debugging} if exists $_[0]->{is_env_debugging}; |
206
|
6
|
50
|
|
|
|
25
|
if ( $ENV{PACKAGE_DEBUG_ALL} ) { |
207
|
0
|
|
|
|
|
0
|
return ( $_[0]->{is_env_debugging} = 1 ); |
208
|
|
|
|
|
|
|
} |
209
|
6
|
|
|
|
|
24
|
for my $key ( $_[0]->env_key, @{ $_[0]->env_key_aliases } ) { |
|
6
|
|
|
|
|
23
|
|
210
|
6
|
100
|
|
|
|
1595
|
next unless exists $ENV{$key}; |
211
|
2
|
50
|
|
|
|
8
|
next unless $ENV{$key}; |
212
|
2
|
|
|
|
|
7
|
return ( $_[0]->{is_env_debugging} = 1 ); |
213
|
|
|
|
|
|
|
} |
214
|
4
|
|
|
|
|
19
|
return ( $_[0]->{is_env_debugging} = 0 ); |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
sub set_is_env_debugging { |
218
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{is_env_debugging} = $_[1]; |
219
|
0
|
|
|
|
|
0
|
return $_[0]; |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
sub into_stash { |
224
|
18
|
100
|
|
18
|
1
|
128
|
return $_[0]->{into_stash} if exists $_[0]->{into_stash}; |
225
|
6
|
|
|
|
|
17238
|
require Package::Stash; |
226
|
6
|
|
|
|
|
59903
|
return ( $_[0]->{into_stash} = Package::Stash->new( $_[0]->into ) ); |
227
|
|
|
|
|
|
|
} |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
sub set_into_stash { |
230
|
0
|
|
|
0
|
1
|
0
|
$_[0]->{into_stash} = $_[1]; |
231
|
0
|
|
|
|
|
0
|
return $_[0]; |
232
|
|
|
|
|
|
|
} |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
sub auto_set_into { |
236
|
6
|
|
|
6
|
1
|
21
|
my ( $self, $add ) = @_; |
237
|
6
|
|
|
|
|
24
|
$_[0]->{into} = [ caller( $self->into_level + $add ) ]->[0]; |
238
|
6
|
|
|
|
|
37
|
return $self; |
239
|
|
|
|
|
|
|
} |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
# Note: Heavy hand-optimisation going on here, this is the hotpath |
243
|
|
|
|
|
|
|
sub debug_prefixed_lines { |
244
|
7
|
|
|
7
|
1
|
1197
|
my $self = shift; |
245
|
7
|
|
|
|
|
31
|
my $prefix = $self->log_prefix; |
246
|
|
|
|
|
|
|
return sub { |
247
|
3
|
|
|
3
|
|
10
|
my (@message) = @_; |
248
|
3
|
|
|
|
|
11
|
for my $line (@message) { |
249
|
3
|
50
|
|
|
|
47
|
*STDERR->print( '[' . $prefix . '] ' ) if defined $prefix; |
250
|
3
|
|
|
|
|
272
|
*STDERR->print($line); |
251
|
3
|
|
|
|
|
77
|
*STDERR->print("\n"); |
252
|
|
|
|
|
|
|
} |
253
|
7
|
|
|
|
|
66
|
}; |
254
|
|
|
|
|
|
|
} |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
sub debug_verbatim { |
258
|
1
|
|
|
1
|
1
|
575
|
my $self = shift; |
259
|
|
|
|
|
|
|
return sub { |
260
|
0
|
|
|
0
|
|
0
|
*STDERR->print(@_); |
261
|
1
|
|
|
|
|
81
|
}; |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
sub env_key_from_package { |
266
|
7
|
|
|
7
|
1
|
505
|
return $_[0]->env_key_prefix() . '_DEBUG'; |
267
|
|
|
|
|
|
|
} |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
sub env_key_prefix_from_package { |
271
|
7
|
|
|
7
|
1
|
419
|
my $package = $_[0]->into; |
272
|
7
|
|
|
|
|
37
|
$package =~ s{ |
273
|
|
|
|
|
|
|
:: |
274
|
|
|
|
|
|
|
}{_}msxg; |
275
|
7
|
|
|
|
|
46
|
return uc $package; |
276
|
|
|
|
|
|
|
} |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
sub log_prefix_from_package_short { |
280
|
6
|
|
|
6
|
1
|
416
|
my $package = $_[0]->into; |
281
|
6
|
100
|
|
|
|
28
|
if ( ( length $package ) < 10 ) { |
282
|
5
|
|
|
|
|
21
|
return $package; |
283
|
|
|
|
|
|
|
} |
284
|
1
|
|
|
|
|
5
|
my (@tokens) = split /::/msx, $package; |
285
|
1
|
|
|
|
|
3
|
my ($suffix) = pop @tokens; |
286
|
1
|
|
|
|
|
3
|
for (@tokens) { |
287
|
4
|
50
|
|
|
|
17
|
if ( $_ =~ /[[:upper:]]/msx ) { |
288
|
4
|
|
|
|
|
11
|
$_ =~ s/[[:lower:]]+//msxg; |
289
|
4
|
|
|
|
|
9
|
next; |
290
|
|
|
|
|
|
|
} |
291
|
0
|
|
|
|
|
0
|
$_ = substr $_, 0, 1; |
292
|
|
|
|
|
|
|
} |
293
|
1
|
|
|
|
|
4
|
my ($prefix) = join q{:}, @tokens; |
294
|
1
|
|
|
|
|
8
|
return $prefix . q{::} . $suffix; |
295
|
|
|
|
|
|
|
} |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
sub log_prefix_from_package_long { |
299
|
2
|
|
|
2
|
1
|
438
|
return $_[0]->into; |
300
|
|
|
|
|
|
|
} |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
sub inject_debug_value { |
304
|
6
|
|
|
6
|
1
|
27
|
my $value_name = $_[0]->value_name; |
305
|
6
|
50
|
|
|
|
30
|
return if not defined $value_name; |
306
|
6
|
|
|
|
|
23
|
my $value = $_[0]->is_env_debugging; |
307
|
6
|
|
|
|
|
25
|
my $stash = $_[0]->into_stash; |
308
|
6
|
100
|
|
|
|
102
|
if ( $stash->has_symbol( q[$] . $value_name ) ) { |
309
|
2
|
|
|
|
|
35
|
$value = $stash->get_symbol( q[$] . $value_name ); |
310
|
2
|
|
|
|
|
15
|
$stash->remove_symbol( q[$] . $value_name ); |
311
|
|
|
|
|
|
|
} |
312
|
6
|
|
|
|
|
74
|
$stash->add_symbol( q[$] . $value_name, \$value ); |
313
|
6
|
|
|
|
|
28
|
return $_[0]; |
314
|
|
|
|
|
|
|
} |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
sub _wrap_debug_sub { |
317
|
6
|
|
|
6
|
|
22
|
my $sub_name = $_[0]->sub_name; |
318
|
6
|
50
|
|
|
|
24
|
return if not defined $sub_name; |
319
|
6
|
|
|
|
|
29
|
my $value_name = $_[0]->value_name; |
320
|
6
|
|
|
|
|
29
|
my $is_env_debugging = $_[0]->is_env_debugging; |
321
|
6
|
0
|
33
|
|
|
28
|
if ( not defined $value_name and not $is_env_debugging ) { |
322
|
0
|
|
|
0
|
|
0
|
return sub { }; |
|
0
|
|
|
|
|
0
|
|
323
|
|
|
|
|
|
|
} |
324
|
6
|
|
|
|
|
31
|
my $real_debug = $_[0]->debug_sub; |
325
|
6
|
|
|
|
|
24
|
my $symbol = $_[0]->into_stash->get_symbol( q[$] . $value_name ); |
326
|
|
|
|
|
|
|
return sub { |
327
|
1000004
|
100
|
|
1000004
|
|
3192834
|
return unless ${$symbol}; |
|
1000004
|
|
|
|
|
2737499
|
|
328
|
3
|
|
|
|
|
15
|
goto $real_debug; |
329
|
6
|
|
|
|
|
56
|
}; |
330
|
|
|
|
|
|
|
} |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
sub inject_debug_sub { |
334
|
6
|
|
|
6
|
1
|
36
|
$_[0]->into_stash->add_symbol( q[&] . $_[0]->sub_name, $_[0]->_wrap_debug_sub ); |
335
|
6
|
|
|
|
|
19
|
return $_[0]; |
336
|
|
|
|
|
|
|
} |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
1; |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
__END__ |