Set variables in the IRSpy object for the implementation name, ID and
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Test / Ping.pm
index bc915db..a6d8d55 100644 (file)
@@ -1,4 +1,3 @@
-# $Id: Ping.pm,v 1.28 2008-07-16 11:51:09 mike Exp $
 
 # See the "Main" test package for documentation
 
@@ -14,7 +13,7 @@ our @ISA = qw(ZOOM::IRSpy::Test);
 use ZOOM::IRSpy::Utils qw(isodate);
 
 use Text::Iconv;
-my $conv = new Text::Iconv("LATIN1", "UTF8");
+my $conv = new Text::Iconv("LATIN1", "UTF-8");
 
 
 sub start {
@@ -53,9 +52,11 @@ sub connected {
            if $conn->option("init_opt_$opt");
     }
 
-    foreach my $opt (qw(serverImplementationId
-                       serverImplementationName
-                       serverImplementationVersion)) {
+    my %params = (serverImplementationId => "id",
+                 serverImplementationName => "name",
+                 serverImplementationVersion => "version",
+                );
+    foreach my $opt (keys %params) {
        my $val = $conn->option($opt);
        next if !defined $val; # not defined for SRU, for example
 
@@ -80,6 +81,7 @@ sub connected {
            $val = $maybe;
        }
        $conn->record()->store_result($opt, value => $val);
+       $conn->irspy()->var($params{$opt}, $val);
     }
 
     return ZOOM::IRSpy::Status::TEST_GOOD;