Skip Menu |

This queue is for tickets about the Net-Ident CPAN distribution.

Report information
The Basics
Id: 44551
Status: resolved
Priority: 0/
Queue: Net-Ident

People
Owner: TODDR [...] cpan.org
Requestors: FANY [...] cpan.org
Cc: 10014530 [...] ticket.noris.net
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.20
Fixed in: (no value)



CC: 10014530 [...] ticket.noris.net
Subject: check for EINPROGRESS does not work for non-English locale
In newFromInAddr(), Net::Ident handles a failed connect() like this: connect($self->{fh}, $identbind) or ($e=$!) =~ /in progress/ or die "= connect failed: $e\n"; This, however, won't work when LC_MESSAGES is set to non-English, e.g.: $ locale | fgrep LC_MESSAGES LC_MESSAGES="de_DE.UTF-8" $ perl -MErrno=EINPROGRESS -le '$!=EINPROGRESS;print $!' Die Operation ist jetzt in Bearbeitung Therefore, I suggest applying the patch which you'll find attached to this message to compare with the constant EINPROGRESS which can be imported from Errno.pm. Regards, fany
Subject: Ident-Errno.patch
--- /usr/local/lib/perl5/site_perl/5.10.0/Net/Ident.pm 1999-08-27 00:58:15.000000000 +0200 +++ Ident.pm 2009-03-25 12:27:16.302859846 +0100 @@ -4,6 +4,7 @@ package Net::Ident; use strict; +use Errno 'EINPROGRESS'; use Socket; use Fcntl; use FileHandle; @@ -170,7 +171,7 @@ # connect it to the remote identd port, this can return EINPROGRESS. # for some reason, reading $! twice doesn't work as it should - connect($self->{fh}, $identbind) or ($e=$!) =~ /in progress/ or + connect($self->{fh}, $identbind) or ($e=$!) == EINPROGRESS or die "= connect failed: $e\n"; }; if ( $@ =~ /^= (.*)/ ) {
I think we're better off using $!{EINPROGRESS} to do the check. Let me know if you have issues.
RT-Send-CC: 10014530 [...] ticket.noris.net
Fixed in 1.21