fix the nasty feature in perl 5.6 with my $ref = $foo if $bar for
[spider.git] / perl / Thingy / Ping.pm
index ec9ce73d1b5b6b208abaea184b2fe3925aecd04c..de295c556c939909dbe062793842867e9942ba2a 100644 (file)
@@ -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 ]);