« 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
| |||||||||||
| 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
| |||||||||||
| 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; | |||||||||