开发者

how to implement import semantics into the current block scope?

开发者 https://www.devze.com 2023-02-14 06:45 出处:网络
The documentation 开发者_高级运维of use indicates that: Some ... pseudo-modules import semantics into the current block scope (like strict or integer , unlike ordinary modules, which import symbols

The documentation 开发者_高级运维of use indicates that:

Some ... pseudo-modules import semantics into the current block scope (like strict or integer , unlike ordinary modules, which import symbols into the current package (which are effective through the end of the file).

Similarly, autodie

Replace functions with ones that succeed or die with lexical scope

How to implement import semantics into the current block scope with ordinary modules?


strict and warnings are implemented using some special flag variables that don't contain room for user pragmas. Starting with perl 5.10, you can write your own lexically scoped pragmas. perlpragma contains information on how to do so. You can also browse the source of existing pragmatic modules.

0

精彩评论

暂无评论...
验证码 换一张
取 消