X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMethod%2FGenerate%2FConstructor.pm;h=1aa822594ba900c481bd5695b828f38b21a9b2f3;hb=57d402efbbb15ffa3ed5415471b4e321f8e1fb80;hp=d24a457e08c74a9de34b3a11265154328d2b80d3;hpb=99b8bec0d3c4fd207387fca31da48fe742ace594;p=gitmo%2FMoo.git diff --git a/lib/Method/Generate/Constructor.pm b/lib/Method/Generate/Constructor.pm index d24a457..1aa8225 100644 --- a/lib/Method/Generate/Constructor.pm +++ b/lib/Method/Generate/Constructor.pm @@ -11,7 +11,7 @@ sub register_attribute_specs { my $specs = $self->{attribute_specs}||={}; while (my ($name, $new_spec) = splice @new_specs, 0, 2) { $new_spec->{index} = scalar keys %$specs - unless exists $new_spec->{index}; + unless defined $new_spec->{index}; $specs->{$name} = $new_spec; } $self;