Change 27804 by [EMAIL PROTECTED] on 2006/04/14 19:44:34

        In the description of require, clarify the file handle return and why
        C<INC> must be qualified.

Affected files ...

... //depot/perl/pod/perlfunc.pod#519 edit

Differences ...

==== //depot/perl/pod/perlfunc.pod#519 (text) ====
Index: perl/pod/perlfunc.pod
--- perl/pod/perlfunc.pod#518~27643~    2006-03-31 05:45:57.000000000 -0800
+++ perl/pod/perlfunc.pod       2006-04-14 12:44:34.000000000 -0700
@@ -4536,7 +4536,10 @@
 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 @@
 
 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;
End of Patch.

Reply via email to