From: John Napiorkowski Date: Thu, 24 Jun 2010 18:14:05 +0000 (-0400) Subject: better error messages X-Git-Tag: 0.02~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ad84652b4e9df919b8dc5444be0aca986273fe9;p=gitmo%2FMooseX-Dependent.git better error messages --- diff --git a/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm b/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm index 7b33f0f..9548ae7 100644 --- a/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm +++ b/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm @@ -195,6 +195,7 @@ sub parameterize { constraining_value => $args, parent_type_constraint=>$self->parent_type_constraint, constraining_value_type_constraint => $self->constraining_value_type_constraint, + message => $self->message, ); ## TODO This is probably going to have to go away (too many things added to the registry) diff --git a/lib/MooseX/Types/Parameterizable.pm b/lib/MooseX/Types/Parameterizable.pm index c5dbc44..18e3951 100644 --- a/lib/MooseX/Types/Parameterizable.pm +++ b/lib/MooseX/Types/Parameterizable.pm @@ -17,7 +17,10 @@ MooseX::Types::Parameterizable - Create your own Parameterizable Types. Within your L declared library module: + use Set::Scalar; use MooseX::Types::Parameterizable qw(Parameterizable); + use MooseX::Types::Moose qw(Int ); + use MooseX::Types -declare=>[qw(Set UniqueInt PositiveSet)]; subtype Set, as class_type("Set::Scalar");