| 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
| |||||||||||||||||||||||||||||
| 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
Condition0%0/3
@_ and shift() eq "commands"
MC/DC0%0/2
@_ and shift() eq "commands"
@_
shift() eq "commands"
Truth table0%0/3
A and B
A= @_B= shift() eq "commands"
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||