Skip Menu |

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

Report information
The Basics
Id: 2174
Status: resolved
Priority: 0/
Queue: Net-Ping-External

People
Owner: Nobody in particular
Requestors: ali [...] aikenweb.com
Cc:
AdminCc:

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



Subject: Bug in Net::Ping::External under localized Win32
Perl v5.6.0 built for MSWin32-x86-multi-thread, Binary build 618 provided by ActiveState Tool Corp. Distr. Net-Ping-External-0.11 OS Windows 98 SE 4.10.2222 A Bug happens at work under Win32 local versions, because the external utility "ping" returns the answer in local language. So, in the Russian version the answer "time nnnn ms" becomes "âðåìÿ nnnn ìñ". Therefore regular expression does not work properly in procedure ping_win32. sub _ping_win32 { my %args = @_; $args{timeout} *= 1000; my $command = "ping -l $args{size} -n $args{count} -w $args{timeout} $args{host}"; print "$command\n" if $DEBUG; my $result = `$command`; Show quoted text
> return 1 if $result =~ /time?\d*ms/;
return 0; } For the given case I have replaced regexp as follows Show quoted text
> return 1 if $result =~ /TTL/;
Substring TTL occurs in the answer when host is alive, and does not depend on the Windows localization.
Integrated my patch (similar to this) in 0.12.