From: Dave Rolsky Date: Fri, 27 Jun 2008 03:42:35 +0000 (+0000) Subject: make this work with (and require) latest Moose, 0.51 X-Git-Tag: 0.06~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c40fb229069279683030c3a30b0cc19a53f877b;p=gitmo%2FMooseX-StrictConstructor.git make this work with (and require) latest Moose, 0.51 --- diff --git a/Build.PL b/Build.PL index 5710f77..e1fd756 100644 --- a/Build.PL +++ b/Build.PL @@ -8,7 +8,7 @@ use Module::Build; my $builder = Module::Build->new ( module_name => 'MooseX::StrictConstructor', license => 'perl', - requires => { 'Moose' => 0.26, + requires => { 'Moose' => 0.51, 'Test::More' => 0, }, create_makefile_pl => 'passthrough', diff --git a/Changes b/Changes index ad89455..61e3792 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +0.06 2008-06-27 + +- Changes to the immutable bits to work with the latest Moose (0.51). + + 0.05 2008-04-18 - The fix in 0.04 only worked for non-immutable classes. diff --git a/lib/MooseX/StrictConstructor/Meta/Method/Constructor.pm b/lib/MooseX/StrictConstructor/Meta/Method/Constructor.pm index 9e82ec0..06d5b10 100644 --- a/lib/MooseX/StrictConstructor/Meta/Method/Constructor.pm +++ b/lib/MooseX/StrictConstructor/Meta/Method/Constructor.pm @@ -25,7 +25,7 @@ override '_generate_BUILDALL' => sub ## no critic RequireArgUnpacking $source .= <<"EOF"; my \%attrs = (@attrs); -my \@bad = sort grep { ! \$attrs{\$_} } keys \%params; +my \@bad = sort grep { ! \$attrs{\$_} } keys \%{ \$params }; if (\@bad) { Carp::confess "Found unknown attribute(s) passed to the constructor: \@bad";