lib/BioX/Workflow/Command/run/Rules/Directives/Types/Roles/File.pm

filter: Statementstmt 31.8% 7 / 22 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 1 totaltotal 30.0% 9 / 30 CC 3 SCAR 20.3
CC
3
Cov
27%
check_file_exists
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.6
« lib/BioX/Workflow/Command/run/Rules/Directives/Types/Path.pm ↑ Summary lib/BioX/Workflow/Command/run/Rules/Directives/Types/Config.pm »
1 package BioX::Workflow::Command::run::Rules::Directives::Types::Roles::File;
2  
3 1 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶sub check_file_exists {
Subroutine check_file_exists: not called CC=3 SCAR=24.8
Pod undocumented
7 0 my $self = shift;
8 0 my $k = shift;
9 0 my $v = shift;
10  
11 0 ▶ if ( !exists $v->{file} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $v->{"file"}) 0 0 0
12 0 $self->app_log->warn( 'You have a key ' . $k );
13 0 $self->app_log->warn(
14 'This maps to a csv file type that requires file and optionally requires options'
15 );
16 0 $self->$k($v);
17 0 return 0;
18 }
19  
20 0 my $file = $self->interpol_directive( $v->{file} );
21 0 ▶ if ( !-e $file ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (-e $file) 0 0 0
22 0 $self->app_log->warn( 'You have a key ' . $k );
23 0 $self->app_log->warn( 'File: ' . $file. ' does not exist.' );
24 0 $self->$k($v);
25 0 return 0;
26 }
27  
28 0 return $file;
29 }
30  
31 1 1;
« lib/BioX/Workflow/Command/run/Rules/Directives/Types/Path.pm ↑ Summary lib/BioX/Workflow/Command/run/Rules/Directives/Types/Config.pm »