in reply to Which pragmas are activated with a specific perl version?
warnings is not included by use VERSION (I learned this the hard way, when I ignored a bug because "it can't happen, warnings would have told me") as demonstrated by:
perl -e "use v5.12; my @b; $a = @b[0]" perl -e "use warnings; my @b; $a = @b[0]" Scalar value @b[0] better written as $b[0] at -e line 1. Name "main::a" used only once: possible typo at -e line 1.
According to Implicit strictures, use VERSION is equivalent to use strict; use feature ':VERSION';, and I don't think anything as been added since. So you can have the list of what is included by looking in %feature::feature_bundle (you can look at the code of feature for more info on that)
Edit: "use VERSION does not load the feature.pm" as quoted by LanX, so %feature::feature_bundle isn't available unless you explicitly call use feature...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Which pragmas are activated with a specific perl version?
by KurtZ (Friar) on Mar 15, 2018 at 12:55 UTC | |
by Eily (Monsignor) on Mar 15, 2018 at 13:13 UTC | |
by KurtZ (Friar) on Mar 15, 2018 at 22:15 UTC |