1Test specifically for things that cop_features broke 2 3__END__ 4# NAME check clearing $^H clears the bits 5use feature 'say'; 6BEGIN { %^H = () } 7say "Fail"; 8EXPECT 9String found where operator expected at - line 3, near "say "Fail"" 10 (Do you need to predeclare say?) 11syntax error at - line 3, near "say "Fail"" 12Execution of - aborted due to compilation errors. 13######## 14# NAME check copying $^H restores the bits 15use feature 'say'; 16say "Hello"; 17BEGIN { our %work = %^H; } 18no feature 'say'; 19BEGIN { %^H = our %work } 20say "Goodbye"; 21EXPECT 22Hello 23Goodbye 24######## 25# NAME check deleting entries (via feature.pm) clears the bits 26use feature 'say'; 27say "Hello"; 28no feature 'say'; 29say "Goodbye"; 30EXPECT 31String found where operator expected at - line 4, near "say "Goodbye"" 32 (Do you need to predeclare say?) 33syntax error at - line 4, near "say "Goodbye"" 34Execution of - aborted due to compilation errors. 35######## 36# NAME check deleting entries (bypass feature.pm) clears the bits 37use feature 'say'; 38say "Hello"; 39BEGIN { delete $^H{feature_say}; } 40say "Goodbye"; 41EXPECT 42String found where operator expected at - line 4, near "say "Goodbye"" 43 (Do you need to predeclare say?) 44syntax error at - line 4, near "say "Goodbye"" 45Execution of - aborted due to compilation errors. 46