X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FMethod%2FConstructor.pm;h=71799404cf0e327a7f973ac6f70ee8790671e70b;hb=7f8de9b4f7ee31388ffb3c32f8d3387ec8e0f599;hp=f14c0354996f0bb0bde8bba487f6388f7ddc9b11;hpb=b73007e54d014101aef2819883f051916c7e1544;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Method/Constructor.pm b/lib/Class/MOP/Method/Constructor.pm index f14c035..7179940 100644 --- a/lib/Class/MOP/Method/Constructor.pm +++ b/lib/Class/MOP/Method/Constructor.pm @@ -110,9 +110,11 @@ sub generate_constructor_method_inline { # NOTE: # create the nessecary lexicals # to be picked up in the eval - my $attrs = $self->attributes; - $code = eval $source; + $code = $self->_eval_closure( + q{my $attrs = $self->attributes;}, + $source + ); confess "Could not eval the constructor :\n\n$source\n\nbecause :\n\n$@" if $@; } return $code;