[Jifty-commit] r634 -

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Feb 26 18:40:29 EST 2006


Author: jesse
Date: Sun Feb 26 18:40:27 2006
New Revision: 634

Modified:
   /   (props changed)
   jifty/trunk/lib/Jifty/Object.pm

Log:
 r24744 at truegrounds:  jesse | 2006-02-26 18:29:35 -0500
 * SIG{__DIE__} wrapper in Jifty::Object


Modified: jifty/trunk/lib/Jifty/Object.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Object.pm	(original)
+++ jifty/trunk/lib/Jifty/Object.pm	Sun Feb 26 18:40:27 2006
@@ -5,6 +5,7 @@
 
 use Log::Log4perl;
 use HTML::Entities;
+use Carp;
 
 =head1 Jifty::Object
 
@@ -32,7 +33,7 @@
 sub current_user {
     my $self = shift;
     $self->{'_current_user'} = shift if (@_); 
-    use Carp qw/croak/; croak unless (ref $self);
+    Carp::croak unless (ref $self);
     return($self->{'_current_user'});
 
 }
@@ -60,6 +61,13 @@
     }
     my $depth = 1;
     my $caller;
+
+    # Mason introduces a DIE handler that generates a mason exception
+    # which in turn generates a backtrace. That's fine when you only
+    # do it once per request. But it's really, really painful when you do it
+    # often, as is the case with fragments
+    #
+    local $SIG{__DIE__} = 'IGNORE';
     eval {
         package DB;
 


More information about the Jifty-commit mailing list