Merge branch 'nigiri'
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Utils.pm
index dcf33ae..dfe4e99 100644 (file)
@@ -6,6 +6,8 @@ use 5.008;
 use strict;
 use warnings;
 
 use strict;
 use warnings;
 
+use Scalar::Util;
+
 use Exporter 'import';
 our @EXPORT_OK = qw(utf8param
                    isodate
 use Exporter 'import';
 our @EXPORT_OK = qw(utf8param
                    isodate
@@ -262,7 +264,7 @@ sub _irspy_identifier2target {
        if !defined $id;
 
     my($protocol, $target) = ($id =~ /(.*?):(.*)/);
        if !defined $id;
 
     my($protocol, $target) = ($id =~ /(.*?):(.*)/);
-    if (uc($protocol) eq "Z39.50") {
+    if (uc($protocol) eq "Z39.50" || uc($protocol) eq "TCP") {
        return "tcp:$target";
     } elsif (uc($protocol) eq "SRU") {
        return "sru=get,http:$target";
        return "tcp:$target";
     } elsif (uc($protocol) eq "SRU") {
        return "sru=get,http:$target";