dwc++'s fix
Yuval Kogman [Tue, 25 Jul 2006 23:45:01 +0000 (23:45 +0000)]
lib/Catalyst.pm

index 90d3610..b619635 100644 (file)
@@ -1147,7 +1147,7 @@ sub execute {
     my $last = pop( @{ $c->stack } );
 
     if ( my $error = $@ ) {
-        if ( $error eq $DETACH ) { die $DETACH if $c->depth > 1 }
+        if ( !ref($error) and $error eq $DETACH ) { die $DETACH if $c->depth > 1 }
         else {
             unless ( ref $error ) {
                 no warnings 'uninitialized';