almr has asked for the wisdom of the Perl Monks concerning the following question:
Found this in https://perldoc.perl.org/perlfunc#use: "If the specified Perl version is >=5.12, strictures are enabled lexically as with use strict. Similarly, if the specified Perl version is >=5.35.0, warnings are enabled. Later use of use VERSION will override all behavior of a previous use VERSION, possibly removing the strict, warnings, and feature added by it. use VERSION does not load the feature.pm, strict.pm, or warnings.pm files."
So... does this mean? If I "use v5.28" do I still need "use strict"? With "use v5.35" do I still need "use warnings"? Is there a different way to "load the feature.pm, strict.pm, or warnings.pm files"? Which version REMOVES "use strict / warnings", or is this something that might happen in the future? Why the hell is this written so opaquely?
Edit: is "use feature q(:5.28)" any different? E.g. would an older perl be able to continue past a requirement for a newer feature bundle?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "use VERSION does not load the feature.pm, strict.pm, or warnings.pm"
by NERDVANA (Priest) on Apr 30, 2024 at 09:25 UTC | |
by almr (Beadle) on Apr 30, 2024 at 17:01 UTC | |
by hv (Prior) on Apr 30, 2024 at 17:33 UTC | |
by NERDVANA (Priest) on Apr 30, 2024 at 17:31 UTC | |
|
Re: "use VERSION does not load the feature.pm, strict.pm, or warnings.pm"
by LanX (Saint) on Apr 29, 2024 at 20:12 UTC |