in reply to Validating against a Moose type-constraint without setting field
You want this:
Basically all this does it locate the underlying type constraint object for you. Alternately you could find the type constraint object in the actual class, which is explain in Moose::Cookbook::Snack::Types.use Moose::Util::TypeConstraints qw[ find_type_constraint ]; # ... find_type_constraint('MyType')->check( $my_value );
-stvn
|
---|
In Section
Seekers of Perl Wisdom