Pragmatic modules have a lexical rather than a dynamic domain.
The pragma version activates certain functions in the current area, depending on the version. It does not activate these features worldwide. This is important for backward compatibility.
, , :
use 5.012;
package Foo;
say "Hi";
, (!= scope).
warnings .
use strict, accross. :
Foo.pm:
say "Hi";
1;
main.pl:
use 5.012;
require Foo;
.
, , . package, , .
use 5.012; use warnings;
package Foo;
...;
package Bar;
...;
1;
package, .
package Foo;
use 5.012; use warnings;
...;
1;
, use: -)