IO::Multiplex on Version 5.38.2 Generates Modification of a read-only value attempted error

I’ve been working on a project using IO::Multiplex but have run into an issue using this with ActiveState Perl version 5.38.2 on Windows 11.

Basically, the code below generates the following error:

Create a listening socket

my $sock = new IO::Socket::INET( Proto => ‘tcp’, LocalPort => $port, Listen => 4 ) or
die “Unable to create socket: $@”;
my $mux = new IO::Multiplex;
$mux->set_callback_object( $obj, $sock );
$mux->listen( $sock );

Modification of a read-only value attempted at c:/Users/jagor/AppData/Local/activestate/cache/386db72f/site/lib/IO/Multiplex.pm line 949.

This worked on ActiveState Perl 5.16 but, of course, I don’t want to be using that older version.

This is an upstream issue (and is uncorrected due to the age of the module).

It stopped working on Windows at Perl 5.18, and hasn’t passed a test on Windows for anyone running any Perl distro on Windows since then.

http://matrix.cpantesters.org/?dist=IO-Multiplex+1.16