| 1 | package Bio::FastParsers::Types; | ||
| 2 | # ABSTRACT: Distribution-wide Moose types for Bio::FastParsers | ||
| 3 | 7 | $Bio::FastParsers::Types::VERSION = '0.221230'; | |
| 4 | 7 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 7 | ▶ | use autodie; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 7 | ▶ | use feature qw(say); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 7 | ▶ | use Path::Class qw(file); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | |||
| 12 | # subtype for 'file' attributes | ||
| 13 | 7 | subtype 'Bio::FastParsers::Types::File' | |
| 14 | => as 'Path::Class::File' | ||
| 15 | ; | ||
| 16 | |||
| 17 | # avoid the need for 'isa' unions such as 'Str|Path::Class::File'... | ||
| 18 | # ... and allow delegating to Path::Class::File methods (e.g., remove) | ||
| 19 | coerce 'Bio::FastParsers::Types::File' | ||
| 20 | => from 'Str' | ||
| 21 | 0 | ▶ | => via { file($_) } |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 22 | 7 | ; | |
| 23 | |||
| 24 | |||
| 25 | 7 | ▶ | no Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | 7 | 1; | |
| 27 | |||
| 28 | __END__ | ||