From: John Napiorkowski Date: Wed, 1 Apr 2009 16:18:40 +0000 (+0000) Subject: changed around to override since we are actually overriding this validation method X-Git-Tag: 0.01~32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Dependent.git;a=commitdiff_plain;h=0712792e6e88947cb1207e65a137919e7fe344dc changed around to override since we are actually overriding this validation method --- 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);