THRIFT-3402: add unix socket support to perl
Client: Perl
Patch: James E. King, III

This closes #670
diff --git a/test/perl/TestClient.pl b/test/perl/TestClient.pl
index 9d4aab2..7ec32bf 100755
--- a/test/perl/TestClient.pl
+++ b/test/perl/TestClient.pl
@@ -35,6 +35,7 @@
 use Thrift::FramedTransport;
 use Thrift::SSLSocket;
 use Thrift::Socket;
+use Thrift::UnixSocket;
 
 use ThriftTest::ThriftTest;
 use ThriftTest::Types;
@@ -48,6 +49,7 @@
 Options:                          (default)
   --cert                                       Certificate to use.
                                                Required if using --ssl.
+  --domain-socket <file>                       Use a unix domain socket.
   --help                                       Show usage.
   --port <portnum>                9090         Port to use.
   --protocol {binary}             binary       Protocol to use.
@@ -65,6 +67,7 @@
 
 GetOptions(\%opts, qw (
     cert=s
+    domain-socket=s
     help
     host=s
     port=i
@@ -84,7 +87,9 @@
 }
 
 my $socket = undef;
-if ($opts{ssl}) {
+if ($opts{"domain-socket"}) {
+    $socket = new Thrift::UnixSocket($opts{"domain-socket"});
+} elsif ($opts{ssl}) {
 	$socket = new Thrift::SSLSocket($opts{host}, $opts{port});
 } else {
 	$socket = new Thrift::Socket($opts{host}, $opts{port});