From: Rafael Garcia-Suarez Date: Wed, 8 Nov 2006 15:14:31 +0000 (+0000) Subject: Change the documentation of the return values of @INC-hooks to match X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cec0e1a713ccb7c8fc9ec931b52653d1683bcbb9;p=p5sagit%2Fp5-mst-13.2.git Change the documentation of the return values of @INC-hooks to match what is tested to work. (It's a bit confusing that optional values might appear at the middle, too.) p4raw-id: //depot/perl@29235 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index db1980f..52f59fd 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4538,22 +4538,16 @@ Subroutine references are the simplest case. When the inclusion system walks through @INC and encounters a subroutine, this subroutine gets 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 nothing, or a list of up to 4 values in the +subroutine should return nothing, or a list of up to three values in the following order: =over =item 1 -A reference to a scalar, containing any initial source code to prepend to -the file or generator output. - - -=item 2 - A filehandle, from which the file will be read. -=item 3 +=item 2 A reference to a subroutine. If there is no filehandle (previous item), then this subroutine is expected to generate one line of source code per @@ -4563,7 +4557,7 @@ called to act a simple source filter, with the line as read in C<$_>. Again, return 1 for each valid line, and 0 after all lines have been returned. -=item 4 +=item 3 Optional state for the subroutine. The state is passed in as C<$_[1]>. A reference to the subroutine itself is passed in as C<$_[0]>.