From: erickson Date: Fri, 17 Jun 2005 14:27:27 +0000 (+0000) Subject: regex to determine unix-ocity for the socket X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3f3490db8adfc7e83ab7a0c44e7337f174114535;p=opensrf%2Fbjwebb.git regex to determine unix-ocity for the socket git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@344 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm b/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm index 67d36b5..de0554d 100644 --- a/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm +++ b/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm @@ -452,7 +452,9 @@ sub initialize { XML my $sock_type = 'IO::Socket::INET'; - unless ($port > 0) { + + # if port is a string, then we're connecting to a UNIX socket + unless( $port =~ /^\d+$/ ) { $sock_type = 'IO::Socket::UNIX'; }