File::Find::Closure从这里读取模块的源代码,我无法理解这些行的目的:
package File::Find::Closures;
use strict;
use warnings;
no warnings;
Run Code Online (Sandbox Code Playgroud)
warnings打开后模块中是否有某些东西无法关闭?从功能上讲,这没有任何意义.这与简单使用是一回事
no warnings;
Run Code Online (Sandbox Code Playgroud)
我可以想到三个动机:
编码人员受制于需要使用的政策,use warnings;他希望在遵守政策信的同时违反政策的精神.
编码器希望-w通过使用来覆盖no warnings;,并且他错误地认为他必须先使用加载模块use warnings;.
编码员想要使用use warnings;,所以他做了,但是模块还没准备好,所以他no warnings;暂时补充说.