]> dxcluster.org Git - spider.git/commitdiff
fixed the eval in DXDb::load a bit better
authorminima <minima>
Mon, 14 May 2001 20:43:43 +0000 (20:43 +0000)
committerminima <minima>
Mon, 14 May 2001 20:43:43 +0000 (20:43 +0000)
perl/DXDb.pm

index 50148ee2a6d47c0c55a4a87d32707d13a7ba3ca5..6ccb9105c3307426b5c430a60fa438c5bda0ec39 100644 (file)
@@ -76,9 +76,10 @@ sub load
 {
        my $s = readfilestr($dbbase, "dbs", "pl");
        if ($s) {
-               my $a = eval $s;
+               my $a;
+               eval "\$a = $s";
                confess $@ if $@;
-               %avail = %{$a} if $a
+               %avail = ( %$a ) if ref $a;
        }
 }