Front page | perl.perl5.porters |
Postings from February 2003
[PATCH] Re: [perl #20551] Documentation error for IO::Select
Thread Next
From:
Richard Soderberg
Date:
February 15, 2003 06:18
Subject:
[PATCH] Re: [perl #20551] Documentation error for IO::Select
Message ID:
87D7A731-40AE-11D7-9B07-000393801F84@crystalflame.net
> Most likely it was meant to be:
>
> @ready = IO::Select->new(@handles)->can_read(0);
Updated (non-reversed) patch attached, against @18703.
> And while I have your attention, I'd advise to change any reference to
> ERROR (the third mask) to EXCEPTION everywhere.
From IO/Select.pm:
warn("Call to deprecated method 'has_error', use 'has_exception'")
The code agrees with you; apparently errors are now called exceptions.
Revised patch attached updates uses of "error" to "exception" as well.
- R.
# attached, Mail.app breaks diff pretty badly.
--- ext/IO/lib/IO/Select.pm.orig 2003-02-14 23:59:01.000000000 -0500
+++ ext/IO/lib/IO/Select.pm 2003-02-15 00:07:33.000000000 -0500
@@ -250,13 +250,13 @@ IO::Select - OO interface to the select
@ready = $s->can_read($timeout);
- @ready = IO::Select->new(@handles)->read(0);
+ @ready = IO::Select->new(@handles)->can_read(0);
=head1 DESCRIPTION
The C<IO::Select> package implements an object approach to the system
C<select>
function call. It allows the user to see what IO handles, see
L<IO::Handle>,
-are ready for reading, writing or have an error condition pending.
+are ready for reading, writing or have an exception pending.
=head1 CONSTRUCTOR
@@ -324,16 +324,16 @@ the C<select> static method.
Return the bit string suitable as argument to the core select() call.
-=item select ( READ, WRITE, ERROR [, TIMEOUT ] )
+=item select ( READ, WRITE, EXCEPTION [, TIMEOUT ] )
-C<select> is a static method, that is you call it with the package
-name like C<new>. C<READ>, C<WRITE> and C<ERROR> are either C<undef>
-or C<IO::Select> objects. C<TIMEOUT> is optional and has the same
-effect as for the core select call.
+C<select> is a static method, that is you call it with the package name
+like C<new>. C<READ>, C<WRITE> and C<EXCEPTION> are either C<undef> or
+C<IO::Select> objects. C<TIMEOUT> is optional and has the same effect
as
+for the core select call.
The result will be an array of 3 elements, each a reference to an array
which will hold the handles that are ready for reading, writing and
have
-error conditions respectively. Upon error an empty array is returned.
+exceptions respectively. Upon error an empty list is returned.
=back
Thread Next
-
[PATCH] Re: [perl #20551] Documentation error for IO::Select
by Richard Soderberg