From 703227f1549138154a892277bca67170373038d9 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 4 Dec 2012 14:40:26 -0800 Subject: [PATCH] override.t: Suppress deprecation warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If we have overridden CORE::GLOBAL::require for the sake of testing it, we can’t do ‘no warnings’ obviously. --- t/op/override.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/op/override.t b/t/op/override.t index e62f785..9202957 100644 --- a/t/op/override.t +++ b/t/op/override.t @@ -63,7 +63,11 @@ is( $r, join($dirsep, "Foo", "Bar.pm") ); } { - no warnings 'deprecated'; + BEGIN { + # Can’t do ‘no warnings’ with CORE::GLOBAL::require overridden. :-) + CORE::require warnings; + unimport warnings 'deprecated'; + } my $_ = 'bar.pm'; require; is( $r, 'bar.pm' ); -- 2.7.4