Subject: | Tests fail with "ERRNO hash is read only" error |
While trying to update the Debian package for Net::Ident, I noticed that
t/Ident.t fails when I have an ident server (pidentd) installed:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/0use.t .... ok
t/apache.t .. skipped: (no reason given)
t/compat.t .. skipped: (no reason given)
t/Ident.t ... ERRNO hash is read only! at /usr/lib/perl/5.10/Errno.pm
line 197
Errno::STORE('Errno=ARRAY(0xbb2c08)', 'EINPROGRESS', 0) called
at /home/chrisb/src/Packages/pkg-perl/libnet-ident-
perl/blib/lib/Net/Ident.pm line 207
Net::Ident::newFromInAddr('Net::Ident',
'\x{2}\x{0}\x{d3}Z\x{7f}\x{0}\x{0}\x{1}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{
0}\x{0}',
'\x{2}\x{0}\x{0}q\x{7f}\x{0}\x{0}\x{1}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0
}\x{0}', 30) called at /home/chrisb/src/Packages/pkg-perl/libnet-ident-
perl/blib/lib/Net/Ident.pm line 137
Net::Ident::new('Net::Ident', 'FileHandle=GLOB(0xbf2f38)', 30)
called at /home/chrisb/src/Packages/pkg-perl/libnet-ident-
perl/blib/lib/Net/Ident.pm line 481
Net::Ident::lookup('FileHandle=GLOB(0xbf2f38)', 30) called at
t/Ident.t line 119
t/Ident.t ... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 7/7 subtests
The error message is generated by Errno when Net::Ident attempts to
modify the special %! tied hash at line 207, to clear the EINPROGRESS
index. This is unnecessary, since the FETCH method for %! bases its
result on the current value of $!, so the previous line that clears $!
is sufficient.
The attached (trivial) patch fixes it.
Subject: | fix-errno-hash-readonly-error |
Message body not shown because it is not plain text.