From cd70eb0ff654ee0efe999a9097d9743ccfb336eb Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 6 Sep 2010 17:43:27 +0100 Subject: [PATCH] Set variables in the IRSpy object for the implementation name, ID and version. These can subsequently be checked by rules. --- lib/ZOOM/IRSpy/Test/Ping.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/ZOOM/IRSpy/Test/Ping.pm b/lib/ZOOM/IRSpy/Test/Ping.pm index 2a97594..a6d8d55 100644 --- a/lib/ZOOM/IRSpy/Test/Ping.pm +++ b/lib/ZOOM/IRSpy/Test/Ping.pm @@ -52,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 @@ -79,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; -- 1.7.10.4