[Jifty-commit] r638 -
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Feb 27 02:19:32 EST 2006
Author: jesse
Date: Mon Feb 27 02:19:32 2006
New Revision: 638
Modified:
/ (props changed)
jifty/trunk/lib/Jifty/Dispatcher.pm
jifty/trunk/lib/Jifty/Object.pm
Log:
r24773 at truegrounds: jesse | 2006-02-27 02:18:34 -0500
* Signal handling cleanup
* Jifty::Dispatcher now cleans out HTML::Mason::Request->instance on load.
This stops redirects from incorrectly detecting a Jifty->request->mason
Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm Mon Feb 27 02:19:32 2006
@@ -408,13 +408,14 @@
local $Dispatcher = $self->new();
-
+ # We don't want the previous mason request hanging aroudn once we start dispatching
+ local $HTML::Mason::Commands::m = undef;
# 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';
+ local $SIG{__DIE__} = 'DEFAULT';
eval {
$Dispatcher->_do_dispatch( Jifty->web->request->path);
@@ -488,7 +489,17 @@
no warnings 'exiting';
sub next_rule { next RULE }
-sub last_rule { die "LAST RULE"; }
+sub last_rule {
+
+ # 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';
+
+ die "LAST RULE";
+}
sub next_show { last HANDLE_WEB }
=head2 _do_under
Modified: jifty/trunk/lib/Jifty/Object.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Object.pm (original)
+++ jifty/trunk/lib/Jifty/Object.pm Mon Feb 27 02:19:32 2006
@@ -67,7 +67,7 @@
# 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';
+ local $SIG{__DIE__} = 'DEFAULT';
eval {
package DB;
More information about the Jifty-commit
mailing list