What are valid Perl module return values?

后端 未结 6 1324
暗喜
暗喜 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条回答
  •  长情又很酷
    2020-12-17 14:54

    Mark Dominus, author of Higher-Order Perl, explains my favorite:

    I have very rarely used $flag = 'Cogito ergo sum'; which as everyone knows is self-evidently true in all possible universes. This ensures maximum portability.

提交回复
热议问题