diff options
author | Yves Orton <demerphq@gmail.com> | 2022-10-28 13:38:21 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-11-01 09:46:16 +0100 |
commit | f7aa676249e16d5f478ada9a1c9d6c8b1071d7ff (patch) | |
tree | ad849e10cf675f41e416f46428199eb71737fb2d /pod/perlfunc.pod | |
parent | 1102a6f006f2bb626d2c7f1c5b7d360c28518129 (diff) | |
download | perl-f7aa676249e16d5f478ada9a1c9d6c8b1071d7ff.tar.gz |
perlfunc.pod - document module_true in the require entry
A brief note pointing people at the feature manpage.
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r-- | pod/perlfunc.pod | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 5ad9106d4d..86b91d487b 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -6746,11 +6746,17 @@ would have semantics similar to the following: Note that the file will not be included twice under the same specified name. -The file must return true as the last statement to indicate +Historically the file must return true as the last statement to indicate successful execution of any initialization code, so it's customary to end such a file with C<1;> unless you're sure it'll return true otherwise. But it's better just to put the C<1;>, in case you add more -statements. +statements. As of 5.37.6 this requirement may be avoided by enabling +the 'module_true' feature, which is enabled by default in modern +version bundles. Thus code with C<use v5.37;> no longer needs to concern +itself with this issue. See L<feature> for more details. Note that this +affects the compilation unit within which the feature is used, and using +it before requiring a module will not change the behavior of existing +modules that do not themselves also use it. If EXPR is a bareword, L<C<require>|/require VERSION> assumes a F<.pm> extension and replaces C<::> with C</> in the filename for you, |