c*****t 发帖数: 10738 | 1 在好些pm文件, 最后1句是
1;
请问这是作什么用的。 谢谢! | s*******k 发帖数: 12 | 2 The last real-code line of all .pm files to be a TRUE value:
1;
is necessary to make sure that the "require" (inside the
"use") doesn't abort.
HTH
【在 c*****t 的大作中提到】 : 在好些pm文件, 最后1句是 : 1; : 请问这是作什么用的。 谢谢!
| s*******k 发帖数: 12 | 3 A follow-up for your question:
in Perl, if no return|exit statements or the like are involved, a function
call usually returns the value of the last statement in its definition
scope.
【在 s*******k 的大作中提到】 : The last real-code line of all .pm files to be a TRUE value: : 1; : is necessary to make sure that the "require" (inside the : "use") doesn't abort. : HTH
|
|