Skip to content

Commit 31bc771

Browse files
committed
perlfunc: document return behavior of require
1 parent 34bbffc commit 31bc771

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ Dagfinn Ilmari Mannsåker <[email protected]> Dagfinn Ilmari Mannsåker (via RT)
232232
233233
Damian Conway <[email protected]> Damian Conway <[email protected]>
234234
235+
235236
Dan Dascalescu <[email protected]> Dan Dascalescu <[email protected]>
236237
Dan Faigin <unknown> Dan Faigin, Doug Landauer <unknown@longtimeago>
237238
Dan Jacobson <[email protected]> Dan Jacobson <[email protected]>

pod/perlfunc.pod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7136,6 +7136,11 @@ affects the compilation unit within which the feature is used, and using
71367136
it before requiring a module will not change the behavior of existing
71377137
modules that do not themselves also use it.
71387138

7139+
In this usage, the (truthy) result of the required file will be returned,
7140+
but this should not be relied upon as it will not be returned in subsequent
7141+
C<require> calls on the same file or with the 'module_true' feature enabled.
7142+
To run a file and retrieve its return value, use L<C<do>|/do EXPR>.
7143+
71397144
If EXPR is a bareword, C<require> assumes a F<.pm>
71407145
extension and replaces C<::> with C</> in the filename for you,
71417146
to make it easy to load standard modules. This form of loading of

0 commit comments

Comments
 (0)