From: Mike Taylor Date: Mon, 5 Jul 2010 17:39:13 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/irspy X-Git-Tag: CPAN-v1.02~26 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=85b72ef01dc55c8a657561d83deb48bd2561b765;hp=e9cefc21a4edfa91f2e1c618ba85643fff9cae78 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/irspy --- diff --git a/Changes b/Changes index 3e5fec3..6e00ec0 100644 --- a/Changes +++ b/Changes @@ -39,6 +39,12 @@ Revision history for Perl extension ZOOM::IRSpy. you cannot search for record syntax "USmarc" if the server response was in lowercase "usmarc". - Run only one instance of the IRSpy script at a time. + - Use iconv character-set name "UTF-8" rather than "UTF8" as + the latter is for some reason not supported by the iconv + package in the Macports collection. + - _irspy_identifier2target() recognises and allows for + comma-separated ZOOM-style options at the front of IRSpy + identifiers. 1.01 Mon Jul 16 12:51:19 BST 2007 - Web UI pages to add or upload a new target are now publicly diff --git a/lib/ZOOM/IRSpy/Test/Ping.pm b/lib/ZOOM/IRSpy/Test/Ping.pm index 31b7f4d..2a97594 100644 --- a/lib/ZOOM/IRSpy/Test/Ping.pm +++ b/lib/ZOOM/IRSpy/Test/Ping.pm @@ -13,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 { 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'";