[Jifty-commit] r633 -

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Feb 26 18:39:43 EST 2006


Author: jesse
Date: Sun Feb 26 18:39:42 2006
New Revision: 633

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

Log:
 r24743 at truegrounds:  jesse | 2006-02-26 18:28:42 -0500
 * Tiny refactoring


Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm	Sun Feb 26 18:39:42 2006
@@ -406,14 +406,18 @@
 sub handle_request {
     my $self = shift;
 
-    my $path = Jifty->web->request->path;
-    # XXX TODO: jesse commented this out because it weirdly breaks things
-    #    $path =~ s{/index\.html$}{};
 
     local $Dispatcher = $self->new();
 
+    # 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 {
-        $Dispatcher->_do_dispatch($path);
+        $Dispatcher->_do_dispatch( Jifty->web->request->path);
     };
     if ( my $err = $@ ) {
         $self->log->warn(ref($err) . " " ."'$err'") if ( $err !~ /^LAST RULE/);


More information about the Jifty-commit mailing list