- or download this
has file => ( isa => 'ExistingFile', is => 'ro', required => 1, coerce
+ => 1 );
- or download this
You cannot coerce an attribute (file) unless its type (ExistingFile) h
+as a coercion at /tmp/test.pl line 26
- or download this
subtype 'ExistingFile' =>
as 'AFile' =>
...
via { file($_) };
has file => ( isa => 'ExistingFile', is => 'ro', required => 1, coerce
+ => 1 );
- or download this
for my $ftype (qw/ AFile ExistingFile /) {
coerce $ftype =>
from 'Str' =>
via { file($_) };
}