At the top of a Perl script, one can write use v5.14
and if the interpreter is older than that, it will exit with an error instead of trying (in vain) to execute a script that depends on features that don't exist yet. Further, this allows the addition of new features without breaking older scripts that expected to be able to use new keywords as identifiers. However, as far as I can tell, this does NOT prevent Perl from inventing new warnings, so code that ran without warnings in an old version will emit them in a new one. Is there a way to ask for "no new warnings please"? The context for this is admittedly silly: I want to use the smartmatch operator, which was retroactively declared experimental, and I don't want to type this ugly thing:
no if $] >= 5.017011, warnings => 'experimental::smartmatch'
EDIT: Footnote: I'm actually using FATAL => 'all', which admittedly has its own issues, but it guarantees that warnings get noticed. Luckily this is a user script (think grep or diff), so there is someone there to do something about it