Set databaseName only temporarily within task.
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Test / Search / Explain.pm
index b665541..a369262 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Explain.pm,v 1.1 2006-10-25 12:44:55 sondberg Exp $
+# $Id: Explain.pm,v 1.3 2006-10-26 12:55:35 mike Exp $
 
 # See the "Main" test package for documentation
 
@@ -22,9 +22,9 @@ sub start {
                      Processing VariantSetInfo UnitSet);
 
     foreach my $category (@explain) {
-        $conn->option('databaseName', 'IR-Explain-1');
        $conn->irspy_search_pqf('@attr exp-1 1=1 ' . $category,
-                                {'category' => $category}, {},
+                                {'category' => $category},
+                               { databaseName => 'IR-Explain-1' },
                                ZOOM::Event::RECV_SEARCH, \&found,
                                exception => \&error);
     }
@@ -37,7 +37,7 @@ sub found {
     my $n = $task->{rs}->size();
     my $ok = 0;
 
-    $conn->log("irspy_test", "Explain category ", $category, " gave, ", $n,
+    $conn->log("irspy_test", "Explain category ", $category, " gave ", $n,
                " hit(s).");
     if ($n > 0) {
         $ok = 1;