pass hashrefs to _new
Yuval Kogman [Thu, 14 Aug 2008 09:00:08 +0000 (09:00 +0000)]
lib/Moose/Meta/Role/Application.pm
lib/Moose/Meta/TypeConstraint/Enum.pm

index dfad321..0241bdb 100644 (file)
@@ -29,7 +29,7 @@ sub new {
                                 : [ $params{excludes} ]);
     }
     
-    $class->_new(%params);
+    $class->_new(\%params);
 }
 
 sub is_method_excluded {
index 570433f..65d8a56 100644 (file)
@@ -20,7 +20,7 @@ sub new {
 
     $args{parent} = Moose::Util::TypeConstraints::find_type_constraint('Str');
 
-    my $self = $class->_new(%args);
+    my $self = $class->_new(\%args);
 
     $self->compile_type_constraint()
         unless $self->_has_compiled_type_constraint;