From: Yuval Kogman Date: Thu, 17 Sep 2009 20:59:29 +0000 (+0300) Subject: remove indirect method confess() in generated code X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3a2d2bd77e28b6aee9ae26f1eb712e7f16d05225;p=gitmo%2FClass-MOP.git remove indirect method confess() in generated code Fully qualifies and parenthesizes the confess() usage in generated accessor code --- diff --git a/lib/Class/MOP/Method/Accessor.pm b/lib/Class/MOP/Method/Accessor.pm index d1a5403..5380f67 100644 --- a/lib/Class/MOP/Method/Accessor.pm +++ b/lib/Class/MOP/Method/Accessor.pm @@ -157,7 +157,7 @@ sub _generate_reader_method_inline { my ( $code, $e ) = $self->_eval_closure( {}, 'sub {' - . 'confess "Cannot assign a value to a read-only accessor" if @_ > 1;' + . 'Carp::confess("Cannot assign a value to a read-only accessor") if @_ > 1;' . $meta_instance->inline_get_slot_value('$_[0]', $attr_name) . '}' );