开发者

how to implement import semantics into the current block scope?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜