What are valid Perl module return values?

后端 未结 6 1312
暗喜
暗喜 2020-12-17 14:39

The common practice in Perl is of course to end modules with 1; so that a call to require can then be checked for success. Is there any reason that the return

6条回答
  •  萌比男神i
    2020-12-17 14:49

    I think (1) there's no problem with returning any arbitrary true value from your module but (2) there's a big problem with the obscure, overly-clever code you suggest to exploit the module implementation details. Don't do that.

提交回复
热议问题