Die/binmode.pm

filter: Statementstmt 100% 12 / 12 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod 0.0% 0 / 1 totaltotal 89.4% 17 / 19 CC 3 SCAR 9.2
CC
3
Cov
94%
binmode
3.0
BEGIN
1.0
CRAP 2.5
« Die/send.pm ↑ Summary Die/close.pm »
1 package IO::Die;
2  
3 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 my $DEFAULT_BINMODE_LAYER = ':raw'; #cf. perldoc -f binmode
6  
7 20 ▶sub binmode {
Subroutine binmode: called CC=3 SCAR=11.0
Pod undocumented
8 20 my ( $NS, $fh_r, $layer ) = @_;
9  
10 20 ▶ if ( !defined $layer ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $layer) 20 0 20
11 20 $layer = $DEFAULT_BINMODE_LAYER;
12 }
13  
14 20 local ( $!, $^E );
15 20 ▶ my $ok = CORE::binmode( $fh_r, $layer ) or do {
Branch: 1 branch
BranchTrueFalseTotal
my $ok = CORE::binmode($fh_r, $layer) or do { $NS->__THROW("Binmode", "layer", $layer) } 10 10 20
16 10 $NS->__THROW( 'Binmode', layer => $layer );
17 };
18  
19 10 return $ok;
20 }
21  
22 1 1;
« Die/send.pm ↑ Summary Die/close.pm »