blib/lib/App/REPL.pm

filter: Statementstmt 68.5% 24 / 35 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 6 / 12 Podpod 100% 6 / 6 totaltotal 58.0% 36 / 62 CC 4 SCAR 14.2
CC
4
Cov
57%
help
12.0
rdebug
6.0
x
2.0
CRAP 4.1
↑ Summary
1 package App::REPL;
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use PadWalker 'peek_my';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Term::ANSIColor ':constants';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 $Term::ANSIColor::AUTORESET = 1;
8 2 require Exporter;
9 2 ▶use vars qw(@ISA @EXPORT $VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 $VERSION = '0.012';
12 2 @ISA = qw(Exporter);
13 2 @EXPORT = qw(x p env ret rdebug help);
14  
15 # ----------------------------------------------------------------------
16 0 ▶sub x { print Dumper @_ }
Subroutine x: not called CC=1 SCAR=6.9
Pod documented
17 0 ▶sub p { print @_, "\n" }
Subroutine p: not called CC=1 SCAR=6.9
Pod documented
18 0 ▶sub env { peek_my(1) }
Subroutine env: not called CC=1 SCAR=6.9
Pod documented
19 0 ▶sub ret { $App::REPL::ret }
Subroutine ret: not called CC=1 SCAR=6.9
Pod documented
20 0 ▶sub rdebug {
Subroutine rdebug: not called CC=2 SCAR=17.9
Pod documented
21 0 ▶ if (@_) { $App::REPL::DEBUG = shift } else { $App::REPL::DEBUG++ }
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 0 0 0
22 0 print YELLOW "Debug level set to $App::REPL::DEBUG\n"
23 }
24 0 ▶sub help {
Subroutine help: not called CC=3 SCAR=24.8
Pod documented
25 0 ▶ if (@_ and shift eq 'commands') {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and shift() eq 'commands') { } 0 0 0
Condition0%0/3
@_ and shift() eq "commands"
!ll&&!rl&&r
000
MC/DC0%0/2
@_ and shift() eq "commands"
@_ shift() eq "commands"
Truth table0%0/3
A and B
A= @_B= shift() eq "commands"
ABresult
0X0
100
111
26 0 system perldoc => 'App::REPL'
27 }
28 else {
29 0 print YELLOW <<EOH;
30 Auto-imported commands (from App::REPL): x p env ret rdebug help
31  
32 See also: C<help 'commands'>
33 EOH
34 }
35 }
36  
37  
38 2 1;
39  
40 __END__
↑ Summary