| 1 | |||||||||||||||||||||
| 2 | 45 | ▶ | use Zoidberg::Shell qw/alias/; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 45 | ▶ | use Zoidberg::Utils qw/output error/; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 45 | alias { test => 'echo ok' }; | |||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 7 | ▶ | Zoidberg::Shell->current()->{commands}{builtin_cat} = sub { | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.1
| |||||||||||||||||||||
| 8 | 7 | my $file = shift; | |||||||||||||||||||
| 9 | 7 | ▶ | open FILE, $file || error "could not open $file"; | ||||||||||||||||||
|
Condition33%1/3
$file || error("could not open $file")
MC/DC0%0/2
$file || error("could not open $file")
$file
error("could not open $file")
Truth table33%1/3
A || B
A= $fileB= error("could not open $file")
| |||||||||||||||||||||
| 10 | 7 | local $/; | |||||||||||||||||||
| 11 | 7 | my @lines = <FILE>; | |||||||||||||||||||
| 12 | 7 | close FILE; | |||||||||||||||||||
| 13 | 7 | output \@lines; | |||||||||||||||||||
| 14 | 45 | }; | |||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 5 | ▶ | Zoidberg::Shell->current()->{commands}{builtin_cat_1} = sub { | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.1
| |||||||||||||||||||||
| 17 | 5 | my $file = shift; | |||||||||||||||||||
| 18 | 5 | ▶ | open FILE, $file || error "could not open $file"; | ||||||||||||||||||
|
Condition33%1/3
$file || error("could not open $file")
MC/DC0%0/2
$file || error("could not open $file")
$file
error("could not open $file")
Truth table33%1/3
A || B
A= $fileB= error("could not open $file")
| |||||||||||||||||||||
| 19 | 5 | local $/; | |||||||||||||||||||
| 20 | 5 | my $lines = join '', <FILE>; | |||||||||||||||||||
| 21 | 5 | close FILE; | |||||||||||||||||||
| 22 | 5 | output $lines; | |||||||||||||||||||
| 23 | 45 | }; | |||||||||||||||||||