oops; went overboard and forgot the whole point of the alt-die branch; need to handle...
[gitmo/Moo.git] / lib / Method / Generate / Accessor.pm
index 185de2c..7c3cf1f 100644 (file)
@@ -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]");
 }