line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package P5U::Command::Peek; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
48402
|
use 5.010; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
36
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
778
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
6
|
1
|
|
|
1
|
|
421
|
use P5U-command; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
BEGIN { |
9
|
|
|
|
|
|
|
$P5U::Command::Peek::AUTHORITY = 'cpan:TOBYINK'; |
10
|
|
|
|
|
|
|
$P5U::Command::Peek::VERSION = '0.001'; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use constant { |
14
|
|
|
|
|
|
|
abstract => q[peek at an SV], |
15
|
|
|
|
|
|
|
usage_desc => q[%c peek CODE], |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub command_names {qw{ peek }} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub opt_spec |
21
|
|
|
|
|
|
|
{ |
22
|
|
|
|
|
|
|
qw() |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
use constant description => <<'DESC'; |
26
|
|
|
|
|
|
|
This is a simple wrapper around Devel::Peek. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Examples: |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
p5u peek '[]' |
31
|
|
|
|
|
|
|
p5u peek 'my @arr; push @arr, 1; \@arr' |
32
|
|
|
|
|
|
|
DESC |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub execute |
35
|
|
|
|
|
|
|
{ |
36
|
|
|
|
|
|
|
require Devel::Peek; |
37
|
|
|
|
|
|
|
my $__sub = eval "no strict; sub { @{[ join ';', @{ $_[2] } ]} }"; |
38
|
|
|
|
|
|
|
Devel::Peek::Dump( $__sub->() ); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |