X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FMethod%2FConstructor.pm;h=c30e0f47d48bd9ecf8ba7ab7e693322b8143c6b9;hb=e24b19fbbf5a62172dad0d8dfb86e03eed9a51c1;hp=14a3c80057dff07613b236e12d773bf36a47db3e;hpb=e4da508a1801f8bf4164d9f5ecbaf96cb343e5aa;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Method/Constructor.pm b/lib/Class/MOP/Method/Constructor.pm index 14a3c80..c30e0f4 100644 --- a/lib/Class/MOP/Method/Constructor.pm +++ b/lib/Class/MOP/Method/Constructor.pm @@ -136,11 +136,11 @@ sub _generate_constructor_method_inline { $source .= ";\n" . '}'; warn $source if $self->options->{debug}; - my $code = $self->_eval_closure( + my ( $code, $e ) = $self->_eval_closure( $close_over, $source ); - confess "Could not eval the constructor :\n\n$source\n\nbecause :\n\n$@" if $@; + confess "Could not eval the constructor :\n\n$source\n\nbecause :\n\n$e" if $e; return $code; }