I have just one question. You wrote that you're using Test::Class and "many of the tests start by loading a bunch of the same modules". That confuses me as Test::Class was originally designed to speed up test suites and did so by loading everything *once* in the same process.
Are you using a separate .t script per test class? That would cause the reloading. Otherwise, a single .t script loading all of your test classes (Test::Class::Load helps) should help you load all classes at once. Assuming they have a sane setup and all call their own test control methods (startup/setup/teardown/shutdown), you could drop something like this in your base class:
# see also http://www.slideshare.net/Ovid/a-whirlwind-tour-of-testclass
sub setup : Tests(setup) {
my $test = shift;
$test->reset_singletons;
}
Yes, it's a hack to work around the fact that you have a bunch of singletons with mutable state, but it seems like this would be much easier (though perhaps less fun :) than your preforking solution.
Cheers,
Ovid
--
Twitter - http://twitter.com/OvidPerl/
Buy my book - http://bit.ly/beginning_perl
Buy my other book - http://www.oreilly.com/catalog/perlhks/
Live and work overseas - http://www.overseas-exile.com/
>________________________________
> From: Jonathan Swartz <swa...@pobox.com>
>To: perl-qa <per...@perl.org>
>Sent: Tuesday, 6 November 2012, 2:03
>Subject: preforking prove