From: Toby Inkster Date: Sat, 15 Jun 2013 11:54:38 +0000 (+0100) Subject: oops; went overboard and forgot the whole point of the alt-die branch; need to handle... X-Git-Tag: v1.003000~47 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7754d2062ba80b30058d8815bb22e2abaa2b4dcc;p=gitmo%2FMoo.git oops; went overboard and forgot the whole point of the alt-die branch; need to handle exceptions which are refs --- diff --git a/lib/Method/Generate/Accessor.pm b/lib/Method/Generate/Accessor.pm index 185de2c..7c3cf1f 100644 --- a/lib/Method/Generate/Accessor.pm +++ b/lib/Method/Generate/Accessor.pm @@ -22,6 +22,9 @@ sub _SIGDIE { our ($CurrentAttribute, $OrigSigDie); $OrigSigDie ||= sub { die $_[0] }; + + return $OrigSigDie->(@_) if ref($_[0]); + my $attr_desc = _attr_desc(@$CurrentAttribute{qw(name init_arg)}); $OrigSigDie->("$CurrentAttribute->{step} for $attr_desc failed: $_[0]"); }