Skip to content
Browse files

Fix use of subtype to avoid warnings from next Moose

  • Loading branch information...
1 parent 262251f commit 3bdf7f8cfffa6f5c55dffb34b40f34cddd6ff58f @autarch autarch committed Jul 14, 2010
Showing with 4 additions and 1 deletion.
  1. +3 −0 Changes
  2. +1 −1 lib/MooseX/Method/Signatures/Meta/Method.pm
View
3 Changes
@@ -1,5 +1,8 @@
Version history for MooseX::Method::Signatures
+0.31
+ * Updated to avoid warnings from Moose 1.09 (Dave Rolsky).
+
0.30 Thu, 04 Feb 2010 02:41:36 +0100
* Make Any instead of Defined the default type constraint.
* Add tests for coercing optional named parameters (Cory Watson).
View
2 lib/MooseX/Method/Signatures/Meta/Method.pm
@@ -247,7 +247,7 @@ sub _param_to_spec {
if ($param->has_constraints) {
my $cb = join ' && ', map { "sub {${_}}->(\\\@_)" } $param->constraints;
my $code = eval "sub {${cb}}";
- $tc = subtype($tc, $code);
+ $tc = subtype( { as => $tc, where => $code } );
}
my %spec;

0 comments on commit 3bdf7f8

Please sign in to comment.
Something went wrong with that request. Please try again.