[Jifty-commit] r1414 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Jun 30 13:56:17 EDT 2006
Author: alexmv
Date: Fri Jun 30 13:56:16 2006
New Revision: 1414
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Handler.pm
Log:
r14648 at zoq-fot-pik: chmrr | 2006-06-30 13:55:48 -0400
* Make sure we don't wrap CGI::new twice
Modified: jifty/trunk/lib/Jifty/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/Handler.pm Fri Jun 30 13:56:16 2006
@@ -31,12 +31,17 @@
# Creating a new CGI object breaks FastCGI in all sorts of painful
# ways. So wrap the call and preempt it if we already have one
use CGI ();
- *CGI::__jifty_real_new = \&CGI::new;
-
- no warnings qw(redefine);
- *CGI::new = sub {
- return Jifty->handler->cgi if Jifty->handler->cgi;
- CGI::__jifty_real_new(@_);
+
+ # If this file ges reloaded using Module::Refresh, don't do this
+ # magic again, or we'll get infinite recursion
+ unless (CGI->can('__jifty_real_new')) {
+ *CGI::__jifty_real_new = \&CGI::new;
+
+ no warnings qw(redefine);
+ *CGI::new = sub {
+ return Jifty->handler->cgi if Jifty->handler->cgi;
+ CGI::__jifty_real_new(@_);
+ }
}
};
More information about the Jifty-commit
mailing list