From efb3be8248d2ab9d737879a9ebf1a4459f5362d4 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 2 Jul 2010 16:22:13 +0100 Subject: [PATCH] _irspy_identifier2target() recognises and allows for comma-separated ZOOM-style options at the front of IRSpy identifiers. --- lib/ZOOM/IRSpy/Utils.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ZOOM/IRSpy/Utils.pm b/lib/ZOOM/IRSpy/Utils.pm index 9ead6b3..089e8e7 100644 --- a/lib/ZOOM/IRSpy/Utils.pm +++ b/lib/ZOOM/IRSpy/Utils.pm @@ -285,13 +285,13 @@ sub _irspy_identifier2target { confess "_irspy_identifier2target(): id is undefined" if !defined $id; - my($protocol, $target) = ($id =~ /(.*?):(.*)/); + my($prefix, $protocol, $target) = ($id =~ /([^:]*,)?(.*?):(.*)/); if (uc($protocol) eq "Z39.50" || uc($protocol) eq "TCP") { - return "tcp:$target"; + return "${prefix}tcp:$target"; } elsif (uc($protocol) eq "SRU") { - return "sru=get,http:$target"; + return "${prefix}sru=get,http:$target"; } elsif (uc($protocol) eq "SRW") { - return "sru=srw,http:$target"; + return "${prefix}sru=srw,http:$target"; } warn "_irspy_identifier2target($id): unrecognised protocol '$protocol'"; -- 1.7.10.4