From: wr3d Date: Sun, 13 Mar 2005 17:15:36 +0000 (+0000) Subject: fix the nasty feature in perl 5.6 with my $ref = $foo if $bar for X-Git-Tag: R_1_52~83 X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=809ac2e606559d68ff6e0580c0681fc71c6bc4b9 fix the nasty feature in perl 5.6 with my $ref = $foo if $bar for pings. --- diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 2bfd6686..ec395d20 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1578,13 +1578,13 @@ sub process # send a ping out on this channel if ($dxchan->{pingint} && $t >= $dxchan->{pingint} + $dxchan->{lastping}) { -# if ($dxchan->{nopings} <= 0) { -# $dxchan->disconnect; -# } else { + if ($dxchan->{nopings} <= 0) { + $dxchan->disconnect; + } else { addping($main::mycall, $dxchan->call); $dxchan->{nopings} -= 1; $dxchan->{lastping} = $t; -# } + } } } diff --git a/perl/Thingy.pm b/perl/Thingy.pm index 5d7909cc..afc2129b 100644 --- a/perl/Thingy.pm +++ b/perl/Thingy.pm @@ -218,7 +218,7 @@ sub ascii my $dd = new Data::Dumper([$thing]); $dd->Indent(0); $dd->Terse(1); - $dd->Sortkeys(1); + #$dd->Sortkeys(1); $dd->Quotekeys($] < 5.005 ? 1 : 0); return $dd->Dumpxs; } diff --git a/perl/Thingy/Ping.pm b/perl/Thingy/Ping.pm index ec9ce73d..de295c55 100644 --- a/perl/Thingy/Ping.pm +++ b/perl/Thingy/Ping.pm @@ -117,7 +117,8 @@ sub handle } else { # it's a reply, look in the ping list for this one - my $ref = $ping{$thing->{id}} if exists $thing->{id}; + my $ref; + $ref = $ping{$thing->{id}} if exists $thing->{id}; $ref = find(($thing->{user}||$thing->{origin}), ($thing->{touser}||$thing->{group})) unless $ref; if ($ref) { my $t = tv_interval($ref->{t}, [ gettimeofday ]);