- or download this
subtype 'DNAString'
=> as Str
=> where { $_ && $_=~/^[AGCTN]+$/i}
=> message {"Not a DNA string: only AGCT or N allowed and cannot be
+empty"};
- or download this
use MyApp::MooseX::MyTypes:
has sequence => (
isa => 'DNAString',
);
- or download this
coerce 'DNAString'
=> from duck_type( ['seq'] )
=> via { $_->seq };
- or download this
use MyApp::MooseX::MyTypes:
has sequence => (
isa => 'DNAString',
coerce => 1,
);