[Jifty-commit] r1243 - in jifty/trunk: lib/Jifty/Script

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Jun 10 16:44:56 EDT 2006


Author: jesse
Date: Sat Jun 10 16:44:54 2006
New Revision: 1243

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

Log:
 r12462 at pinglin:  jesse | 2006-06-10 16:43:55 -0400
 * The Test::Builder hack we're using to stop a mysterious bug in Jifty::Server under profiling was clobbering our __DIE__ handler. So we're working around the workaround


Modified: jifty/trunk/lib/Jifty/Script/Server.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/Server.pm	(original)
+++ jifty/trunk/lib/Jifty/Script/Server.pm	Sat Jun 10 16:44:54 2006
@@ -4,6 +4,19 @@
 package Jifty::Script::Server;
 use base qw/App::CLI::Command/;
 
+# XXX: if test::builder is not used, sometimes connection is not
+# properly closed, causing the client to wait for the content for a
+# 302 redirect, see t/06-signup.t, which timeouts after test 24.
+# If we load this after we load the rest of Jifty, its die handler clobbers ours.
+# HATE.  And even worse, Test::Builder clobbers our global SIG{__DIE__} handler.
+# So we work around the work around. The real answer is to figure out how Test::Builder 
+# makes our test server not hang and do just that
+my $x;
+BEGIN {$x = $SIG{__DIE__}; }
+use Test::Builder ();
+BEGIN { $SIG{__DIE__} = $x;}
+
+
 use Jifty::Everything;
 use Jifty::Server;
 use File::Path ();
@@ -46,11 +59,6 @@
 
 =cut
 
-# XXX: if test::builder is not used, sometimes connection is not
-# properly closed, causing the client to wait for the content for a
-# 302 redirect, see t/06-signup.t, which timeouts after test 24.
-use Test::Builder ();
-
 sub run {
     my $self = shift;
     Jifty->new();


More information about the Jifty-commit mailing list