in reply to "use VERSION does not load the feature.pm, strict.pm, or warnings.pm"

From the docs

use VERSION

Lexically enables all features available in the requested version as defined by the feature pragma, disabling any features not in the requested version's feature bundle. See feature

I never tried to use different versions inside the same file and I don't recommend it.

Here what I read (untested)

... it says that inside the scope of a use version all previous versions are to be considered irrelevant. IOW you can downgrade the features by going back to a lower version. ¹

There is ambiguity with certain pragmas like strict tho, when used simultaneously.

In the current implementation, any explicit use of use strict or no strict overrides use VERSION, even if it comes before it.

Those pragmas are implemented inside their own pm files, like strict.pm. And you can disable them with no

Those files "are not loaded" means they are not implicitly require d.

use version is implementing the effects directly and you can't rely on the pragma files being present. For instance by checking %INC

Again untested (I'm on Android right now) but this seems plausible.

> Why the hell is this written so opaquely?

The "opaqueness" is a result of the authors wanting to cover all rare edge cases.

I often wished that the perldocs were easier and covering the relevant 90% functionality in 10% text, while linking to the remaining 90% text covering the complicated edge cases most people avoid.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

¹) see also feature#Lexical-effect

  • Comment on Re: "use VERSION does not load the feature.pm, strict.pm, or warnings.pm"