blib/lib/Bio/Gonzales/Util/IO/Compressed.pm

filter: Statementstmt 100% 33 / 33 Branchbran 50.0% 3 / 6 Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 2 totaltotal 82.1% 46 / 56 CC 6 SCAR 10.6
CC
6
Cov
86%
new
5.5
close
2.0
BEGIN
1.0
CRAP 2.9
« blib/script/bg_xlsx2tsv.pl ↑ Summary blib/lib/Bio/Gonzales/Matrix/IO/csv.pm »
1 package Bio::Gonzales::Util::IO::Compressed;
2  
3 30 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 30 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 30 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 30 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 30 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 30 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 sub new {
13 3 ▶ my $type = shift;
Subroutine new: called CC=5 SCAR=17.1
Pod undocumented
14 3 ▶ my $class = ref($type) || $type || die "error in class creation: " . __PACKAGE__;
Condition40%2/5
ref $type || $type || die('error in class creation: Bio::Gonzales::Util::IO::Compressed')
l!l
30
ref $type or $type
l!l&&r!l&&!r
030
MC/DC0%0/2
ref $type || $type || die('error in class creation: Bio::Gonzales::Util::IO::Compressed')
ref $type $type
Truth table33%1/3
A or B
A= ref $typeB= $type
ABresult
1X1
011
000
15 3 ▶ @_ == 2 or croak "usage: new $class FH, PID";
Branch: 1 branch
BranchTrueFalseTotal
@_ == 2 or croak("usage: new $class FH, PID") 0 3 3
16  
17 3 my ( $fh, $pid ) = @_;
18 3 my $me = bless $fh, $class;
19  
20 3 ▶ die unless defined $pid;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $pid 0 3 3
21 3 ${*$me}{'io_pipe_pid'} = $pid;
22  
23 3 $me;
24 }
25  
26 sub close {
27 3 ▶ my $fh = shift;
Subroutine close: called CC=2 SCAR=7.0
Pod undocumented
28 3 my $r = CORE::close($fh);
29  
30 3 waitpid( ${*$fh}{'io_pipe_pid'}, 0 )
31 3 ▶ if ( defined ${*$fh}{'io_pipe_pid'} );
Branch: 1 branch
BranchTrueFalseTotal
if defined do { *$fh }->{"io_pipe_pid"} 3 0 3
32  
33 3 $r;
34 }
35  
36 30 1;
« blib/script/bg_xlsx2tsv.pl ↑ Summary blib/lib/Bio/Gonzales/Matrix/IO/csv.pm »