THRIFT-4069: perl library cleanup - namespaces, versioning, exception fixes
Client: perl

This closes #1220
diff --git a/lib/perl/test/multiplex.t b/lib/perl/test/multiplex.t
index 76f2706..90a9b4d 100644
--- a/lib/perl/test/multiplex.t
+++ b/lib/perl/test/multiplex.t
@@ -22,15 +22,13 @@
 use strict;
 use warnings;
 
-use Thrift;
-use Thrift::Socket;
-use Thrift::Server;
-use Thrift::MultiplexedProcessor;
 use Thrift::BinaryProtocol;
-use Thrift::MemoryBuffer;
 use Thrift::FramedTransport;
 use Thrift::MemoryBuffer;
-
+use Thrift::MessageType;
+use Thrift::MultiplexedProcessor;
+use Thrift::Server;
+use Thrift::Socket;
 
 use BenchmarkService;
 use Aggr;
@@ -103,7 +101,7 @@
 
     $aggr_protocol->readMessageBegin(\$function_name, \$message_type, \$sequence_id);
 
-    if ($message_type == TMessageType::EXCEPTION) {
+    if ($message_type == Thrift::TMessageType::EXCEPTION) {
        die;
     }
     
@@ -116,7 +114,7 @@
 
 $aggr_protocol->readMessageBegin(\$function_name, \$message_type, \$sequence_id);
 
-if ($message_type == TMessageType::EXCEPTION) {
+if ($message_type == Thrift::TMessageType::EXCEPTION) {
     die;
 }
     
@@ -132,7 +130,7 @@
 
     $benchmark_protocol->readMessageBegin(\$function_name, \$message_type, \$sequence_id);
 
-    if ($message_type == TMessageType::EXCEPTION) {
+    if ($message_type == Thrift::TMessageType::EXCEPTION) {
         die;
     }
     my $benchmark_result = BenchmarkService_fibonacci_result->new();
diff --git a/lib/perl/test/processor.t b/lib/perl/test/processor.t
index 1d8be73..f833035 100644
--- a/lib/perl/test/processor.t
+++ b/lib/perl/test/processor.t
@@ -22,9 +22,9 @@
 use strict;
 use warnings;
 
-use Thrift;
 use Thrift::BinaryProtocol;
 use Thrift::MemoryBuffer;
+use Thrift::MessageType;
 
 use ThriftTest::ThriftTest;
 use ThriftTest::Types;
@@ -72,7 +72,7 @@
     $protocol->readMessageBegin(\$function_name, \$message_type, \$sequence_id);
     print "  $function_name, $message_type, $sequence_id\n";
 
-    if ($message_type == TMessageType::EXCEPTION) {
+    if ($message_type == Thrift::TMessageType::EXCEPTION) {
         die;
     }