move recent new entries to the front of the list
[spider.git] / perl / QSL.pm
index 8849be0853cc5ce930e30701db57eab05ba7a247..abb8b86cf6a771e850f1532195b3fef246144146 100644 (file)
@@ -80,7 +80,7 @@ sub update
                        }
                } else {
                        $r = [$man, 1, $t, $by];
-                       push @{$self->[1]}, $r;
+                       unshift @{$self->[1]}, $r;
                }
        }
        $self->put;
@@ -88,8 +88,8 @@ sub update
 
 sub get
 {
-       my $key = uc shift;
        return undef unless $dbm;
+       my $key = uc shift;
        my $value;
        
        my $r = $dbm->get($key, $value);