--- Makefile.PL (revision 54978)
+++ Makefile.PL (local)
@@ -21,7 +21,9 @@
VERSION_FROM => $pm_file,
INSTALLDIRS => 'perl',
PREREQ_PM => {
- 'Test::Builder' => 0,
+ # create() was introduced in Test-Simple 0.60 which
+ # contained Test::Builder 0.30.
+ 'Test::Builder' => 0.30,
},
dist => {
PREOP=> "rm -f README; pod2text -80 < $doc_file > README; cp -f README $dir-\$(VERSION); "
--- lib/Test/Tester/Capture.pm (revision 54978)
+++ lib/Test/Tester/Capture.pm (local)
@@ -25,19 +25,10 @@
my @Test_Results = (); share(@Test_Results);
my $Prem_Diag = {diag => ""}; share($Curr_Test);
-sub new
-{
- # Test::Tester::Capgture::new used to just return __PACKAGE__
- # because Test::Builder::new enforced it's singleton nature by
- # return __PACKAGE__. That has since changed, Test::Builder::new now
- # returns a blessed has and around version 0.78, Test::Builder::todo
- # started wanting to modify $self. To cope with this, we now return
- # a blessed hash. This is a short-term hack, the correct thing to do
- # is to detect which style of Test::Builder we're dealing with and
- # act appropriately.
-
+my $Builder;
+sub new {
my $class = shift;
- return bless {}, $class;
+ return $Builder ||= $class->SUPER::create(@_);
}
sub ok {