diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-08 15:14:31 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-08 15:14:31 +0000 |
commit | cec0e1a713ccb7c8fc9ec931b52653d1683bcbb9 (patch) | |
tree | 09f0d6041cc4f63c0018f4d97d660bc3b2250656 /pod/perlfunc.pod | |
parent | 822f7be5701ff678f484c099543fb1f80aa67f16 (diff) | |
download | perl-cec0e1a713ccb7c8fc9ec931b52653d1683bcbb9.tar.gz |
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
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r-- | pod/perlfunc.pod | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index db1980f57e..52f59fd42a 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<Foo/Bar.pm>"). 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]>. |