Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Does IO::Select work? (Problem partially resolved)

by Anonymous Monk
on Oct 21, 2012 at 11:02 UTC ( #1000204=note: print w/ replies, xml ) Need Help??


in reply to Re: Does IO::Select work? (Problem partially resolved)
in thread Does IO::Select work? Anywhere?

Yup, that CPAN source is about 3 years out of date, http://perl5.git.perl.org/perl.git/history/HEAD:/dist/IO shows very recent edits


Comment on Re^2: Does IO::Select work? (Problem partially resolved)
Re^3: Does IO::Select work? (Problem partially resolved)
by BrowserUk (Pope) on Oct 21, 2012 at 11:23 UTC

    Hm. So, the CPAN source is *NOT* the place to go for the latest version. That sucks!

    And, according to IO::Select: allow removal of IO::Handle objects without fileno the fix was implemented in January 2011, and I am using 5.16:

    C:\test>asyncServer2.pl Perl -v: 5.016001 IO::Socket: 1.34 IO::Select: 1.21 ... C:\test>head -20 \perl64-16\lib\IO\Select.pm # IO::Select.pm # # Copyright (c) 1997-8 Graham Barr <gbarr@pobox.com>. All rights reser +ved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. package IO::Select; use strict; use warnings::register; use vars qw($VERSION @ISA); require Exporter; $VERSION = "1.21"; @ISA = qw(Exporter); # This is only so we can do version checking sub VEC_BITS () {0} sub FD_COUNT () {1} sub FIRST_FD () {2}

    which I'm pretty sure came out after that and still seeing the problem?

    Perhaps because the 'fix', removes the handle from the array, but fails to remove it from the bitmask:

    } else { # remove if ( ! defined $fn ) { # remove if fileno undef'd defined($_) && $_ == $f and do { $vec->[FD_COUNT]--; $_ = und +ef; } for @{$vec}[FIRST_FD .. $#$vec]; next; ####################################################### +#### ???? } my $i = $fn + FIRST_FD; next unless defined $vec->[$i]; $vec->[FD_COUNT]--; vec($bits, $fn, 1) = 0; $vec->[$i] = undef; }

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000204]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (13)
As of 2014-09-19 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls