The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Check the lexical scoping of the switch keywords.
(The actual behaviour is tested in t/op/smartmatch.t)

__END__
# No ~~; should be a syntax error.
use warnings;
print +(2 ~~ 2);
EXPECT
syntax error at - line 3, near "2 ~"
Execution of - aborted due to compilation errors.
########
# With ~~, should work
use warnings;
use feature "~~";
print +(2 ~~ 2);
EXPECT
1
########
# ~~ out of scope; should be a syntax error.
use warnings;
{ use feature '~~'; }
print +(2 ~~ 2);
EXPECT
syntax error at - line 4, near "2 ~"
Execution of - aborted due to compilation errors.
########
# 'no feature' should work
use warnings;
use feature '~~';
print +(2 ~~ 2), "\n";
no feature;
print +(2 ~~ 2), "\n";
EXPECT
syntax error at - line 6, near "2 ~"
Execution of - aborted due to compilation errors.
########
# 'no feature "~~"' should work too
use warnings;
use feature '~~';
print +(2 ~~ 2), "\n";
no feature "~~";
print +(2 ~~ 2), "\n";
EXPECT
syntax error at - line 6, near "2 ~"
Execution of - aborted due to compilation errors.