Dana Pet 26. Pro 2014, 05:29:25, tiago.peczenyj@gmail.com reče: > Hello, > > I find one bug on POSIX::strerror on 5.21.7 - it erase the $! > variable! > > I discover this based on this ticket: > > https://github.com/Weborama/Riak-Light/issues/18 > > I try to reproduce the error using the 5.21.7 and I discover one > strange behavior on POSIX::strerror > > IF I do this > > < perl code > > use POSIX qw(ETIMEDOUT strerror); > $! = ETIMEDOUT; > my $errmsg = strerror(ETIMEDOUT); > < / perl code > > > after the strerror, the content of $! was totally erased. and it has a > bad impact on my tests. > > Seems the origin of this problem is this change between 5.21.6 and > 5.21.7 > > - strerror => 'errno => local $! = $_[0]; "$!"', > + strerror => 'errno => use locale; local $! = $_[0]; "$!"', > > I attach two files: > > one is a propose to test this bug. it works for 5.12.2 and fails for > 5.21.7 > > another is a more complete test, to show what I am doing. A possible fix is attached. Regards, Slaven --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=123503Thread Previous