t/51flags-lexical.t
raw| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | use v5.14; |
| 4 | use warnings; |
| 5 | |
| 6 | use Test2::V0; |
| 7 | BEGIN { |
| 8 | $] >= 5.016000 or plan skip_all => "Lexical-prefixed keywords are not supported on Perl 5.14"; |
| 9 | } |
| 10 | |
| 11 | use lib "t"; |
| 12 | use testcase "t::flags"; |
| 13 | |
| 14 | BEGIN { $^H{"t::flags/permit"} = 1; } |
| 15 | |
| 16 | { |
| 17 | my $ret = do { my flaglex lexical; }; |
| 18 | is( $ret, "my lexical" ); |
| 19 | } |
| 20 | |
| 21 | { |
| 22 | my $ret = do { flaglex nonlexical; }; |
| 23 | is( $ret, "nonlexical" ); |
| 24 | } |
| 25 | |
| 26 | done_testing; |