X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FMeta%2FTypeConstraint%2FDependent.pm;h=6360c7585019b3a111e10970a13960c1b87ae930;hb=0712792e6e88947cb1207e65a137919e7fe344dc;hp=7de4db228f186fe3b9fcd061c7a93f090126ddf2;hpb=ae1d065233974a8e76f9b8da9f696a9380a32d4e;p=gitmo%2FMooseX-Dependent.git diff --git a/lib/MooseX/Meta/TypeConstraint/Dependent.pm b/lib/MooseX/Meta/TypeConstraint/Dependent.pm index 7de4db2..6360c75 100644 --- a/lib/MooseX/Meta/TypeConstraint/Dependent.pm +++ b/lib/MooseX/Meta/TypeConstraint/Dependent.pm @@ -112,12 +112,12 @@ around 'new' => sub { =head2 validate -We intercept validate in order to custom process the message +We intercept validate in order to custom process the message. =cut -around 'validate' => sub { - my ($validate, $self, @args) = @_; +override 'validate' => sub { + my ($self, @args) = @_; my $compiled_type_constraint = $self->_compiled_type_constraint; my $message = bless {message=>undef}, 'MooseX::Types::Dependent::Message'; my $result = $compiled_type_constraint->(@args, $message);