1Check the lexical scoping of the say keyword. 2(The actual behaviour is tested in t/op/say.t) 3 4__END__ 5# No say; should be a syntax error. 6use warnings; 7say "Hello", "world"; 8EXPECT 9Unquoted string "say" may clash with future reserved word at - line 3. 10String found where operator expected at - line 3, near "say "Hello"" 11 (Do you need to predeclare say?) 12syntax error at - line 3, near "say "Hello"" 13Execution of - aborted due to compilation errors. 14######## 15# With say, should work 16use warnings; 17use feature "say"; 18say "Hello", "world"; 19EXPECT 20Helloworld 21######## 22# With say, should work in eval too 23use warnings; 24use feature "say"; 25eval q(say "Hello", "world"); 26EXPECT 27Helloworld 28######## 29# feature out of scope; should be a syntax error. 30use warnings; 31{ use feature 'say'; } 32say "Hello", "world"; 33EXPECT 34Unquoted string "say" may clash with future reserved word at - line 4. 35String found where operator expected at - line 4, near "say "Hello"" 36 (Do you need to predeclare say?) 37syntax error at - line 4, near "say "Hello"" 38Execution of - aborted due to compilation errors. 39######## 40# 'no feature' should work 41use warnings; 42use feature 'say'; 43say "Hello", "world"; 44no feature; 45say "Hello", "world"; 46EXPECT 47Unquoted string "say" may clash with future reserved word at - line 6. 48String found where operator expected at - line 6, near "say "Hello"" 49 (Do you need to predeclare say?) 50syntax error at - line 6, near "say "Hello"" 51Execution of - aborted due to compilation errors. 52######## 53# 'no feature "say"' should work too 54use warnings; 55use feature 'say'; 56say "Hello", "world"; 57no feature 'say'; 58say "Hello", "world"; 59EXPECT 60Unquoted string "say" may clash with future reserved word at - line 6. 61String found where operator expected at - line 6, near "say "Hello"" 62 (Do you need to predeclare say?) 63syntax error at - line 6, near "say "Hello"" 64Execution of - aborted due to compilation errors. 65