I'm running on about 4 hours sleep in the past 36 hours coming out here to Atlanta, Georgia from San Francisco for ApacheCon. I got to the hotel today and made my way to the hackathon. I managed to find Gozer, and discussed with him some issues I was running into separating Apache::Reload from the mod_perl core codebase. The issue at hand was how to factor out the test code which causes the same mod_perl interpreter to be used for sequential requests. The existing code that does this (TestCommon::SameInterp) uses an http header and then repeatedly sends requests to the Apache::Test server until it receives the same interpreter. Not ideal, and we brainstormed ways to get around that with something more elegant.
Paul Querna was sitting at the table next to ours, so we went over and Gozer picked his brain about the best way to do that. He said that keep-alives turned on should do the trick, since that will force the same interpreter to be used for a given connection. I initially tried that for this stuff, but I was still getting my feet wet with Apache::Test. Gozer worked on getting keep-alives turned on for lwp requests, but somewhere in the Apache::Test guts the keep-alive settings were being overridden.
Right about that time Geoff Young showed up, and we told him what we were up to. He told us how to issue the magic incantation (
Apache::TestRequest::user_agent(keep_alive => 1);) to Apache::Test to make this work, and a few minutes later we (well mostly Gozer) had ported the cookie unit test to use keep-alives instead of the SameInterp code. The resulting code was 2 lines shorter and makes testing a lot cleaner. I managed to find one more line of code that wasn't needed, so the end result is net 3 lines negative. Couldn't have accomplished this so fast without help from everyone, looking forward to tomorrow.