line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::REPL; |
2
|
1
|
|
|
1
|
|
24940
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
1088
|
use Data::Dumper; |
|
1
|
|
|
|
|
12042
|
|
|
1
|
|
|
|
|
88
|
|
5
|
1
|
|
|
1
|
|
915
|
use PadWalker 'peek_my'; |
|
1
|
|
|
|
|
863
|
|
|
1
|
|
|
|
|
84
|
|
6
|
1
|
|
|
1
|
|
1424
|
use Term::ANSIColor ':constants'; |
|
1
|
|
|
|
|
9013
|
|
|
1
|
|
|
|
|
1102
|
|
7
|
|
|
|
|
|
|
$Term::ANSIColor::AUTORESET = 1; |
8
|
|
|
|
|
|
|
require Exporter; |
9
|
1
|
|
|
1
|
|
11
|
use vars qw(@ISA @EXPORT $VERSION); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
298
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = '0.012'; |
12
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
13
|
|
|
|
|
|
|
@EXPORT = qw(x p env ret rdebug help); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
16
|
0
|
|
|
0
|
1
|
|
sub x { print Dumper @_ } |
17
|
0
|
|
|
0
|
1
|
|
sub p { print @_, "\n" } |
18
|
0
|
|
|
0
|
1
|
|
sub env { peek_my(1) } |
19
|
0
|
|
|
0
|
1
|
|
sub ret { $App::REPL::ret } |
20
|
|
|
|
|
|
|
sub rdebug { |
21
|
0
|
0
|
|
0
|
1
|
|
if (@_) { $App::REPL::DEBUG = shift } else { $App::REPL::DEBUG++ } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
print YELLOW "Debug level set to $App::REPL::DEBUG\n" |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
sub help { |
25
|
0
|
0
|
0
|
0
|
1
|
|
if (@_ and shift eq 'commands') { |
26
|
0
|
|
|
|
|
|
system perldoc => 'App::REPL' |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
else { |
29
|
0
|
|
|
|
|
|
print YELLOW <
|
30
|
|
|
|
|
|
|
Auto-imported commands (from App::REPL): x p env ret rdebug help |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
See also: C |
33
|
|
|
|
|
|
|
EOH |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |