in reply to Re^3: RFC: pragma pragmatic
in thread RFC: pragma pragmatic
Requiring say to be enabled is about backwards compatibility; making that lexical, is not.
That's not true. Limiting the scope of use feature is required to enable backwards compatibility. If the effect of use feature qw( say ); was global, the following would break:
# script.pl use feature qw( say ); use Module; say Module::foo();
# Module.pm package Module; sub say { "I say \"$_[0]\""; ) sub foo { say "Hi!"; } 1;
If you put X inside curlies, it is no longer at global (file) scope.
It's never globally scoped; it's always lexically scoped.
|
|---|