Avoid undefined variable warning when no ZOOM options precede specified ID.
authorMike Taylor <mike@miketaylor.org.uk>
Tue, 6 Jul 2010 10:38:19 +0000 (11:38 +0100)
committerMike Taylor <mike@miketaylor.org.uk>
Tue, 6 Jul 2010 10:38:19 +0000 (11:38 +0100)
lib/ZOOM/IRSpy/Utils.pm

index 089e8e7..475e9de 100644 (file)
@@ -286,6 +286,7 @@ sub _irspy_identifier2target {
        if !defined $id;
 
     my($prefix, $protocol, $target) = ($id =~ /([^:]*,)?(.*?):(.*)/);
+    $prefix ||= "";
     if (uc($protocol) eq "Z39.50" || uc($protocol) eq "TCP") {
        return "${prefix}tcp:$target";
     } elsif (uc($protocol) eq "SRU") {