diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-04-14 19:44:34 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-04-14 19:44:34 +0000 |
commit | 92c6daad83acab71abd7df8769e308064578da8e (patch) | |
tree | 46ec6ddbffffe802a3d87b24cb48b2e28e06bd1f /pod | |
parent | 6a9cfe87cba24ccf1641367562bf64bc566d5066 (diff) | |
download | perl-92c6daad83acab71abd7df8769e308064578da8e.tar.gz |
In the description of require, clarify the file handle return and why
C<INC> must be qualified.
p4raw-id: //depot/perl@27804
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlfunc.pod | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index d638cc14f2..da46ec9fa1 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4536,7 +4536,10 @@ called with two parameters, the first being a reference to itself, and the second the name of the file to be included (e.g. "F<Foo/Bar.pm>"). The subroutine should return C<undef> or a filehandle, from which the file to include will be read. If C<undef> is returned, C<require> will look at -the remaining elements of @INC. +the remaining elements of @INC. Note that a tied file handle must be a +real file handle (strictly a typeglob, or reference to a typeglob, blessed or +unblessed) - tied file handles will be ignored and treated as a return of +C<undef>. If the hook is an array reference, its first element must be a subroutine reference. This subroutine is called as above, but the first parameter is @@ -4563,8 +4566,8 @@ or: If the hook is an object, it must provide an INC method that will be called as above, the first parameter being the object itself. (Note that -you must fully qualify the sub's name, as it is always forced into package -C<main>.) Here is a typical code layout: +you must fully qualify the sub's name, as unqualified C<INC> is always forced +into package C<main>.) Here is a typical code layout: # In Foo.pm package Foo; |