line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::ebug::Plugin::Pad; |
2
|
|
|
|
|
|
|
|
3
|
19
|
|
|
19
|
|
11175
|
use strict; |
|
19
|
|
|
|
|
40
|
|
|
19
|
|
|
|
|
552
|
|
4
|
19
|
|
|
19
|
|
84
|
use warnings; |
|
19
|
|
|
|
|
32
|
|
|
19
|
|
|
|
|
540
|
|
5
|
19
|
|
|
19
|
|
91
|
use base qw(Exporter); |
|
19
|
|
|
|
|
28
|
|
|
19
|
|
|
|
|
7442
|
|
6
|
|
|
|
|
|
|
our @EXPORT = qw(pad pad_human); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.63'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# find the pad |
11
|
|
|
|
|
|
|
sub pad { |
12
|
31
|
|
|
31
|
0
|
13629
|
my($self) = @_; |
13
|
31
|
|
|
|
|
225
|
my $response = $self->talk({ command => "pad" }); |
14
|
31
|
|
|
|
|
240
|
return $response->{pad}; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# human-readable pad |
18
|
|
|
|
|
|
|
sub pad_human { |
19
|
9
|
|
|
9
|
0
|
1726
|
my($self) = @_; |
20
|
9
|
|
|
|
|
31
|
my $pad = $self->pad; |
21
|
9
|
|
|
|
|
57
|
foreach my $var (keys %$pad) { |
22
|
36
|
100
|
|
|
|
142
|
if ($var =~ /^@/) { |
|
|
100
|
|
|
|
|
|
23
|
9
|
|
|
|
|
17
|
my @values = @{$pad->{$var}}; |
|
9
|
|
|
|
|
27
|
|
24
|
9
|
|
|
|
|
38
|
my $value = $self->stack_trace_human_args(@values); |
25
|
9
|
|
|
|
|
23
|
$pad->{$var} = $value; |
26
|
|
|
|
|
|
|
} elsif ($var =~ /^%/) { |
27
|
9
|
|
|
|
|
18
|
$pad->{$var} = '(...)'; |
28
|
|
|
|
|
|
|
} else { |
29
|
18
|
|
|
|
|
41
|
my $value = $pad->{$var}; |
30
|
18
|
|
|
|
|
62
|
$value = $self->stack_trace_human_args($value); |
31
|
18
|
|
|
|
|
60
|
$value =~ s/^\(//; |
32
|
18
|
|
|
|
|
58
|
$value =~ s/\)$//; |
33
|
18
|
|
|
|
|
58
|
$pad->{$var} = $value; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
9
|
|
|
|
|
40
|
return $pad; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |