| 1 | 1 | ▶ | use Perlmazing qw(croak); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | sub main { | ||||||||||||||||||||||||||
|
Subroutine
main: called CC=6 SCAR=18.6
Pod
undocumented
| |||||||||||||||||||||||||||||
| 4 | 1 | my $filename = shift; | |||||||||||||||||||||||||||
| 5 | 1 | my $data = shift; | |||||||||||||||||||||||||||
| 6 | 1 | my $binmode = shift; | |||||||||||||||||||||||||||
| 7 | 1 | my $encoding; | |||||||||||||||||||||||||||
| 8 | { | ||||||||||||||||||||||||||||
| 9 | 1 | ▶ | no warnings 'numeric'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 1 | ▶ | if ($binmode and ($binmode + 0) ne '1') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$binmode and $binmode + 0 ne 1
MC/DC0%0/2
$binmode and $binmode + 0 ne 1
$binmode
$binmode + 0 ne 1
Truth table33%1/3
A and B
A= $binmodeB= $binmode + 0 ne 1
| |||||||||||||||||||||||||||||
| 11 | 1 | $encoding = $binmode; | |||||||||||||||||||||||||||
| 12 | 1 | undef $binmode; | |||||||||||||||||||||||||||
| 13 | } | ||||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||
| 15 | 1 | ▶ | open my $out, '>'.($encoding ? ":encoding($encoding)" : ''), $filename or croak "Cannot write to $filename: $!"; | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 16 | 1 | ▶ | binmode($out) if $binmode; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 17 | 1 | print $out $data; | |||||||||||||||||||||||||||
| 18 | 1 | close $out; | |||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 1; | ||||||||||||||||||||||||||||