X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FMethod%2FConstructor.pm;h=3717b5bd0df01b0fe7f23d801fc5114abf3974fe;hb=9409e92e75a6e1060eb3d0adcfc7965713d3d776;hp=2c3322a6f6b3b57406abb0ecc855f5eb5478939b;hpb=dc39b8509deeefd2204942516e4161ac10a2a38d;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Method/Constructor.pm b/lib/Moose/Meta/Method/Constructor.pm index 2c3322a..3717b5b 100644 --- a/lib/Moose/Meta/Method/Constructor.pm +++ b/lib/Moose/Meta/Method/Constructor.pm @@ -6,7 +6,7 @@ use warnings; use Scalar::Util 'blessed', 'weaken', 'looks_like_number'; -our $VERSION = '0.70'; +our $VERSION = '0.72'; our $AUTHORITY = 'cpan:STEVAN'; use base 'Moose::Meta::Method', @@ -117,7 +117,7 @@ sub associated_metaclass { (shift)->{'associated_metaclass'} } # this was changed in 0.41, but broke MooseX::Singleton, so try to catch # any other code using the original broken spelling -sub intialize_body { Moose->throw_error("Please correct the spelling of 'intialize_body' to 'initialize_body'") } +sub intialize_body { $_[0]->throw_error("Please correct the spelling of 'intialize_body' to 'initialize_body'") } sub initialize_body { my $self = shift; @@ -221,7 +221,7 @@ sub _generate_triggers { . '$instance, ' . $self->meta_instance->inline_get_slot_value( '$instance', - ("'" . $attr->name . "'") + $attr->name, ) . ', ' . '$attrs->[' . $i . ']' @@ -319,7 +319,7 @@ sub _generate_slot_assignment { $source = ( $self->meta_instance->inline_set_slot_value( '$instance', - ("'" . $attr->name . "'"), + $attr->name, $value ) . ';' ); @@ -332,7 +332,7 @@ sub _generate_slot_assignment { "\n" . $self->meta_instance->inline_weaken_slot_value( '$instance', - ("'" . $attr->name . "'") + $attr->name ) . ' if ref ' . $value . ';' );