Subject: | T::B dies if the test corrupts @INC |
If the test corrupts @INC, e.g. @INC=(), then T::B gets confused and dies.
This is a real-life problem, triggered by
Test-Harness-3.14/t/compat/regression.t . (The test was fixed in
Test-Harness-3.15.)
The problem has been introduced by the following commit
http://github.com/schwern/test-more/commit/9c56ac75f0097f1f219937594eb3bc15c93f6224#diff-0
The first chunk of the diff is the reason of this issue: the former
"||return" was replaced by option "die_on_fail".
Please consider applying the patch attached.
Subject: | 0001-Test-Builder-do-not-die-if-the-test-corrupted-INC.patch |
From b3e15fbe90377db95e5f404b648b06aca05b5758 Mon Sep 17 00:00:00 2001
From: Stepan Kasal <skasal@redhat.com>
Date: Wed, 18 Feb 2009 12:00:35 +0100
Subject: [PATCH] Test::Builder: do not die if the test corrupted @INC
---
lib/Test/Builder.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Test/Builder.pm b/lib/Test/Builder.pm
index 8a969bf..6205d61 100644
--- a/lib/Test/Builder.pm
+++ b/lib/Test/Builder.pm
@@ -548,7 +548,7 @@ sub _unoverload {
my $self = shift;
my $type = shift;
- $self->_try(sub { require overload; }, die_on_fail => 1);
+ $self->_try(sub { require overload; });
foreach my $thing (@_) {
if( $self->_is_object($$thing) ) {
--
1.6.0.6