| 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')
ref $type or $type
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
| |||||||||||||||||||||||||
| 15 | 3 | ▶ | @_ == 2 or croak "usage: new $class FH, PID"; | ||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||
| 17 | 3 | my ( $fh, $pid ) = @_; | |||||||||||||||||||||||
| 18 | 3 | my $me = bless $fh, $class; | |||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||
| 20 | 3 | ▶ | die unless defined $pid; | ||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||
| 33 | 3 | $r; | |||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||
| 36 | 30 | 1; | |||||||||||||||||||||||