Hello,
consider the code fragment below. Why does it fail on
'$person->name(substr 'John', 0, 255)' ?
"Attribute (name) does not pass the type constraint because: Validation
failed for 'Str' failed with value John"
Thank you,
Jiri
-----------------------------------------------------
package Person;
use Moose;
has name => (
is => 'rw',
isa => 'Str',
);
1;
package main;
my $person = Person->new;
$person->name('John');
print 'person name is: ', $person->name, "\n";
$person->name(substr 'John', 0, 255);
print 'person name is: ', $person->name, "\n";