From 05318b48ad757265538a2aed6476e1ae7d9310ed Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 21 Jun 2016 03:25:37 -0400 Subject: [PATCH] protect tests against random foreign hints (cperl) --- t/sub-quote.t | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/t/sub-quote.t b/t/sub-quote.t index 5480da5..c63d8f7 100644 --- a/t/sub-quote.t +++ b/t/sub-quote.t @@ -179,6 +179,7 @@ BEGIN { $INC{'UseHintHash.pm'} = 1; sub import { + $^H |= 0x020000; $^H{__PACKAGE__.'/enabled'} = 1; } } @@ -186,6 +187,10 @@ BEGIN { { my %hints; { + BEGIN { + $^H |= 0x020000; + %^H = (); + } use UseHintHash; BEGIN { %hints = %^H } } @@ -194,6 +199,10 @@ BEGIN { local $TODO = 'hints hash from context not available on perl 5.8' if "$]" < 5.010_000; + BEGIN { + $^H |= 0x020000; + %^H = (); + } use UseHintHash; is_deeply quote_sub(q{ our %temp_hints_hash; -- 2.1.4