lib/Bio/AssemblyImprovement/Scaffold/SSpace/TempDirectoryRole.pm

filter: Statementstmt 100% 22 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 96.6% 29 / 30 CC 2 SCAR 2.6
CC
2
Cov
96%
_build__temp_directory_obj
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« lib/Bio/AssemblyImprovement/FillGaps/GapFiller/Iterative.pm ↑ Summary lib/Bio/AssemblyImprovement/Assemble/SGA/IndexAndCorrectReads.pm »
1 package Bio::AssemblyImprovement::Scaffold::SSpace::TempDirectoryRole;
2 # ABSTRACT: Role for handling temp directories
3  
4  
5  
6 13 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 13 ▶use Cwd;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 13 ▶use File::Temp;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 13 has '_temp_directory_obj' => ( is => 'ro', isa => 'File::Temp::Dir', lazy => 1, builder => '_build__temp_directory_obj' );
11 13 has '_temp_directory' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build__temp_directory' );
12 13 has 'debug' => ( is => 'ro', isa => 'Bool', default => 0);
13  
14 75 ▶sub _build__temp_directory_obj {
Subroutine _build__temp_directory_obj: called CC=2 SCAR=7.0
15 75 my ($self) = @_;
16
17 75 my $cleanup = 1;
18 75 ▶ $cleanup = 0 if($self->debug == 1);
Branch: 1 branch
BranchTrueFalseTotal
if $self->debug == 1 0 75 75
19 75 File::Temp->newdir( CLEANUP => $cleanup , DIR => getcwd() );
20 }
21  
22 75 ▶sub _build__temp_directory {
Subroutine _build__temp_directory: called CC=1 SCAR=0.0
23 75 my ($self) = @_;
24 75 $self->_temp_directory_obj->dirname();
25 }
26  
27 13 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 13 1;
29  
30 __END__
« lib/Bio/AssemblyImprovement/FillGaps/GapFiller/Iterative.pm ↑ Summary lib/Bio/AssemblyImprovement/Assemble/SGA/IndexAndCorrectReads.pm »