From: Nicholas Clark Date: Fri, 14 Apr 2006 19:44:34 +0000 (+0000) Subject: In the description of require, clarify the file handle return and why X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=92c6daad83acab71abd7df8769e308064578da8e;p=p5sagit%2Fp5-mst-13.2.git In the description of require, clarify the file handle return and why C must be qualified. p4raw-id: //depot/perl@27804 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index d638cc1..da46ec9 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"). The subroutine should return C or a filehandle, from which the file to include will be read. If C is returned, C 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. 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
.) Here is a typical code layout: +you must fully qualify the sub's name, as unqualified C is always forced +into package C
.) Here is a typical code layout: # In Foo.pm package Foo;