On Thu, Mar 07, 2002 at 01:25:55AM +0300, Anton Tagunov wrote:
> Hi! How about this?
>
> --- pod/perlsub.pod.orig Wed Feb 20 18:02:38 2002
> +++ pod/perlsub.pod Thu Mar 7 00:30:53 2002
> @@ -169,7 +169,7 @@
>
> Like the flattened incoming parameter list, the return list is also
> flattened on return. So all you have managed to do here is stored
> -everything in C<@a> and made C<@b> an empty list. See
> +everything in C<@a> and made C<@b> an empty array. See
Not sure. I'd like to find a way to phrase that without describing @b as
either "list" or array. It's set to an empty list, but it is an array.
And finding a way of saying that without using either word feels best.
> L<Pass by Reference> for alternatives.
>
> A subroutine may be called using an explicit C<&> prefix. The
> @@ -727,8 +727,8 @@
>
> sub ioqueue {
> local (*READER, *WRITER); # not my!
> - pipe (READER, WRITER); or die "pipe: $!";
> - return (*READER, *WRITER);
> + pipe (READER, WRITER) or die "pipe: $!";
> + return (*READER{IO}, *WRITER{IO});
> }
> ($head, $tail) = ioqueue();
>
> --end of patch--
>
>
> Have I been too bold with adding {IO}? To tell the truth I do
> not understand what is happening completely, so it's again a
> blindfolded strike. I guess that with my patch instead of
> typeglobs this sample starts returning references to file handles.
>
> Is that okay? Is that smth to recommend to people?
Not sure. I'm not sure what's going on with the IO, but it's late an I'm
tired. However, I'm replying because I can see a syntax error that the
patch removes, and as nothing has been applied, that syntax error remained.
Was there ever a feasible plan on how to automate syntax checking of all
the code examples in the pod snippets?
[I remember this rant I had about perlipc once. (rant-and-patch, IIRC)
I also remember another thing that fell off my to-do list - try to make
some of the perlipc examples into regression tests. That was related to
the SOCKS5-rant]
Nicholas Clark
--
Even better than the real thing: http://nms-cgi.sourceforge.net/