fix the nasty feature in perl 5.6 with my $ref = $foo if $bar for
[spider.git] / perl / Thingy / Ping.pm
index 0d005e48eccf923d67ddd8b7f1f5922a76fea5e7..de295c556c939909dbe062793842867e9942ba2a 100644 (file)
@@ -117,8 +117,9 @@ sub handle
                } else {
 
                        # it's a reply, look in the ping list for this one
-                       my $ref = $ping{$thing->{id}} if exists $thing->{id};
-                       $ref ||= find(($thing->{user}||$thing->{origin}), ($thing->{touser}||$thing->{group}));
+                       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 ]);
                                my $tochan = DXChannel::get($ref->{touser} || $ref->{group});