Skip to content

Instantly share code, notes, and snippets.

@preaction
Created October 2, 2014 02:40
Show Gist options
  • Save preaction/9e33650932b56b30437f to your computer and use it in GitHub Desktop.
Save preaction/9e33650932b56b30437f to your computer and use it in GitHub Desktop.
C also enables all features available in the requested version as defined by the C pragma, disabling any features not in the requested version's feature bundle. See L. Similarly, if the specified Perl version is greater than or equal to 5.12.0, strictness is enabled lexically as with C. Any explicit use of C or C overrides C, even if it comes before it. The F and F files are not used for C.
# Explicitly disabling before use VERSION works as described
» perl -e'no strict "vars"; use 5.012; $foo'
# Explicitly enabling only part of strict before use VERSION does not stop the other stricts from being applied
» perl -e'use strict "subs"; use 5.012; $foo'
Global symbol "$foo" requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment