| 1 | package App::CmdDispatch::IO; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 11 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 11 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 11 | ▶ | use Term::ReadLine; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 11 | our $VERSION = '0.44'; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 11 | my $term; | |||||||||||||||||||
| 10 | sub new | ||||||||||||||||||||
| 11 | 4 | ▶ | { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||
| 12 | 4 | my ($class) = @_; | |||||||||||||||||||
| 13 | 4 | ▶ | $term ||= Term::ReadLine->new('CmdDispatch Shell'); | ||||||||||||||||||
|
Condition66%2/3
$term ||= "Term::ReadLine"->new("CmdDispatch Shell")
MC/DC0%0/2
$term ||= "Term::ReadLine"->new("CmdDispatch Shell")
$term
"Term::ReadLine"->new("CmdDispatch Shell")
Truth table66%2/3
A ||= B
A= $termB= "Term::ReadLine"->new("CmdDispatch Shell")
| |||||||||||||||||||||
| 14 | 4 | $term->ornaments( 0 ); | |||||||||||||||||||
| 15 | 4 | return bless { term => $term }, $class; | |||||||||||||||||||
| 16 | } | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | sub print | ||||||||||||||||||||
| 19 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
print: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 20 | 0 | my $self = shift; | |||||||||||||||||||
| 21 | 0 | return CORE::print @_; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | sub readline | ||||||||||||||||||||
| 25 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
readline: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 26 | 0 | my ($self) = @_; | |||||||||||||||||||
| 27 | 0 | return $self->{term}->readline( '' ); | |||||||||||||||||||
| 28 | } | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | sub prompt | ||||||||||||||||||||
| 31 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
prompt: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 32 | 0 | my ($self, @in) = @_; | |||||||||||||||||||
| 33 | 0 | return $self->{term}->readline( @in ); | |||||||||||||||||||
| 34 | } | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | { | ||||||||||||||||||||
| 37 | package App::CmdDispatch::MinimalIO; | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | sub new | ||||||||||||||||||||
| 40 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 41 | 0 | my ($class) = @_; | |||||||||||||||||||
| 42 | 0 | return bless {}, $class; | |||||||||||||||||||
| 43 | } | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | sub print | ||||||||||||||||||||
| 46 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
print: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 47 | 0 | my $self = shift; | |||||||||||||||||||
| 48 | 0 | return CORE::print @_; | |||||||||||||||||||
| 49 | } | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | sub readline | ||||||||||||||||||||
| 52 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
readline: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 53 | 0 | my ($self) = @_; | |||||||||||||||||||
| 54 | 0 | return CORE::readline; | |||||||||||||||||||
| 55 | } | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | sub prompt | ||||||||||||||||||||
| 58 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
prompt: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 59 | 0 | my ($self, @in) = @_; | |||||||||||||||||||
| 60 | 0 | $self->print( @in ); | |||||||||||||||||||
| 61 | 0 | return $self->readline(); | |||||||||||||||||||
| 62 | } | ||||||||||||||||||||
| 63 | } | ||||||||||||||||||||
| 64 | 11 | 1; | |||||||||||||||||||
| 65 | __END__ | ||||||||||||||||||||