bin/zx81_dump_p

filter: Statementstmt 94.1% 16 / 17 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 84.6% 22 / 26 CC 1 SCAR 0.0
CC
1
Cov
83%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« bin/zx81_make_p ↑ Summary bin/zx81_list_p »
1 #!/usr/bin/env perl
2  
3 37 ▶use Modern::Perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 37 ▶use ZX81::Tape qw(dump_p);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 37 ▶use Getopt::Std;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 37 my $USAGE = "Usage: $0 [-o output_file.txt] input_file.p\n";
8 37 ▶getopts( 'o:', \my %opts ) or die $USAGE;
Branch: 1 branch
BranchTrueFalseTotal
&getopts("o:", \my %opts) or die $USAGE 37 0 37
9 37 ▶@ARGV == 1 or die $USAGE;
Branch: 1 branch
BranchTrueFalseTotal
@ARGV == 1 or die $USAGE 37 0 37
10 37 my $input_file = shift @ARGV;
11  
12 37 ▶if ( $opts{o} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opts{'o'}) { } 37 0 37
13 37 my $output_file = $opts{o};
14 37 dump_p( $input_file, $output_file );
15 }
16 else {
17 0 dump_p($input_file);
18 }
19  
20 __END__
« bin/zx81_make_p ↑ Summary bin/zx81_list_p »