From: Dave Rolsky Date: Fri, 14 Oct 2011 21:30:59 +0000 (-0500) Subject: Fix uninit var warning from _inline_create_error when $args is undef X-Git-Tag: 2.0301~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e54172c933143dae4b03fe5ab82122e3ca845ded;p=gitmo%2FMoose.git Fix uninit var warning from _inline_create_error when $args is undef --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 49114ef..97901da 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -830,7 +830,10 @@ sub _inline_create_error { # to provide a non-inherited inlining method, because falling back to # the default inlining method is most likely going to be wrong # yes, this is a huge hack, but so is the entire error system, so. - return '$meta->create_error(' . $msg . ', ' . $args . ');' + return + '$meta->create_error(' + . $msg + . ( defined $args ? ', ' . $args : q{} ) . ');' unless $class->meta->has_method('_inline_new'); $class->_inline_new(