QCons/Types.pm

filter: Statementstmt 100% 26 / 26 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 100% 37 / 37 CC 2 SCAR 1.8
CC
2
Cov
100%
_exists_executable
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« QCons.pm ↑ Summary
1 package Bio::Tools::Run::QCons::Types;
2 {
3 3 $Bio::Tools::Run::QCons::Types::VERSION = '0.112990'; # TRIAL
4 }
5  
6 # ABSTRACT: Type library for Bio::Tools::Run::QCons
7  
8 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 ▶use Mouse::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 ▶use IPC::Cmd qw(can_run);
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 subtype 'Executable'
17 => as 'Str',
18 4 ▶ => where { _exists_executable($_) },
Subroutine __ANON__: called CC=1 SCAR=0.0
19 2 ▶ => message { "Can't find $_ in your PATH or not an executable" };
Subroutine __ANON__: called CC=1 SCAR=0.0
20  
21 4 ▶sub _exists_executable {
Subroutine _exists_executable: called CC=2 SCAR=6.9
22 4 my $candidate = shift;
23  
24 4 ▶ return 1 if -x $candidate;
Branch: 1 branch
BranchTrueFalseTotal
if -x $candidate 1 3 4
25  
26 3 return scalar can_run($candidate);
27 }
28  
29 3 ▶no Mouse::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 __END__
« QCons.pm ↑ Summary