edan has asked for the wisdom of the Perl Monks concerning the following question:

Monks,

I am writing a script that uses IO::Poll, which is part of the Perl Standard Distribution (or whatever it's called). We are running Perl 5.6.1, and that's not about to change...

Okay, so now I find out that there is a Bug in the 5.6.1 version of IO::Poll (V0.05). I think the bug is fixed in V0.06, which ships with Perl 5.8.0. I have to stick with 5.6.1, but does that mean that I can't update any of the core modules if there is a bug? When I search cpan for IO::Poll, I get Perl 5.8.0, which, like I said, doesn't help me much.

O wise monks, does this mean I have to switch over to IO::Select ?! If not, please advise how I go about updating my 5.6.1 with the 5.8.0 version of IO::Poll

Thanks for your wisdom

--
3dan
  • Comment on Installing a newer version of a core module

Replies are listed 'Best First'.
Re: Installing a newer version of a core module (same way)
by tye (Sage) on Mar 20, 2003 at 16:25 UTC

    Grab the source code for Perl v5.8.0, unpack it somewhere, then enter these commands:

    cd perl-5.8.0 cd ext/IO perl Makefile.PL make test make install
    where 'make' might be 'nmake' or such on some fringe operating systems (where, since C code is involved, you'll also need the compiler used to build your distribution of Perl, likely MS VC++).

                    - tye
Re: Installing a newer version of a core module
by shotgunefx (Parson) on Mar 20, 2003 at 16:04 UTC
    I'm not sure but if it's a pure perl module, you could just patch it easy enough. If it's not then you might have problems forcing an install of an XS module as there might be some differences in the header files and what not.

    -Lee

    "To be civilized is to deny one's nature."
Re: Installing a newer version of a core module
by Thelonius (Priest) on Mar 21, 2003 at 16:07 UTC
    In general you can't know without looking, but in this case it looks like the changes would be fine for 5.6.1. Here is the diff output for the two versions:
    16c16 < $VERSION = "0.05"; --- > $VERSION = "0.06"; 56,58c56,62 < delete $self->[0]{$fd}{$io}; < delete $self->[1]{$fd} unless %{$self->[0]{$fd}}; < delete $self->[2]{$io}; --- > delete $self->[0]{$fd}{$io}; > unless(%{$self->[0]{$fd}}) { > # We no longer have any handles for this FD > delete $self->[1]{$fd}; > delete $self->[0]{$fd}; > } > delete $self->[2]{$io};
Re: Installing a newer version of a core module
by edan (Curate) on Mar 23, 2003 at 08:29 UTC

    Okay, so I can just take the V0.06 IO::Poll from Perl 5.8.0 and use it in my Perl 5.6.1 installation, right? And I don't think I need to compile anything, since I don't need to replace the whole IO:: hierarchy, just this one module, and it's Pure Perl.

    So where is the best place to put it, to be sure that it will be found before the V0.05 version in the regular lib location? We have our own library directory that we put in front of @INC, but it seems a bit odd to me to put a core module in our own directory. But on the other hand, it is a non-standard version for 5.6.1, so maybe it is appropriate?

    Thoughts, comments?


    --
    3dan