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=7eb9250279254b38a56ecebf89b37b90754385bd;hpb=25129bd5710585818d14764fa88ac9e685bdf68f;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Method/Constructor.pm b/lib/Class/MOP/Method/Constructor.pm index 7eb9250..c30e0f4 100644 --- a/lib/Class/MOP/Method/Constructor.pm +++ b/lib/Class/MOP/Method/Constructor.pm @@ -7,7 +7,7 @@ use warnings; use Carp 'confess'; use Scalar::Util 'blessed', 'weaken', 'looks_like_number'; -our $VERSION = '0.82'; +our $VERSION = '0.86'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -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; } @@ -266,12 +266,6 @@ inlined. This returns the L object for the method. -=item B<< $metamethod->can_be_inlined >> - -This method always returns true in this class. It exists so that -subclasses (as in Moose) can do some sort of checking to determine -whether or not inlining the constructor is safe. - =back =head1 AUTHORS