[Moose-commits] r7461 -
MooseX-Params-Validate/trunk/lib/MooseX/Params
autarch at code2.0beta.co.uk
autarch at code2.0beta.co.uk
Sun Feb 1 05:45:16 GMT 2009
Author: autarch
Date: 2009-01-31 21:45:15 -0800 (Sat, 31 Jan 2009)
New Revision: 7461
Modified:
MooseX-Params-Validate/trunk/lib/MooseX/Params/Validate.pm
Log:
Include constraint name in PV callback name, gives a better error message
Modified: MooseX-Params-Validate/trunk/lib/MooseX/Params/Validate.pm
===================================================================
--- MooseX-Params-Validate/trunk/lib/MooseX/Params/Validate.pm 2009-02-01 05:44:09 UTC (rev 7460)
+++ MooseX-Params-Validate/trunk/lib/MooseX/Params/Validate.pm 2009-02-01 05:45:15 UTC (rev 7461)
@@ -153,7 +153,8 @@
$pv_spec{constraint} = $constraint;
$pv_spec{callbacks} = {
- 'checking type constraint' => sub { $constraint->check( $_[0] ) }
+ 'checking type constraint for '
+ . $constraint->name => sub { $constraint->check( $_[0] ) }
};
}
elsif ( exists $spec->{does} ) {
@@ -172,7 +173,8 @@
$pv_spec{constraint} = $constraint;
$pv_spec{callbacks} = {
- 'checking type constraint' => sub { $constraint->check( $_[0] ) }
+ 'checking type constraint for '
+ . $constraint->name => sub { $constraint->check( $_[0] ) }
};
}
More information about the Moose-commits
mailing list