| 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
| |||||||||||
| 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__ | ||||||||||