diff --git a/compiler/cpp/src/thrift/generate/t_perl_generator.cc b/compiler/cpp/src/thrift/generate/t_perl_generator.cc
index 5a308cf..8924a76 100644
--- a/compiler/cpp/src/thrift/generate/t_perl_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_perl_generator.cc
@@ -354,7 +354,7 @@
   } else if (type->is_enum()) {
     out << value->get_integer();
   } else if (type->is_struct() || type->is_xception()) {
-    out << "new " << perl_namespace(type->get_program()) << type->get_name() << "({" << endl;
+    out << perl_namespace(type->get_program()) << type->get_name() << "->new({" << endl;
     indent_up();
 
     const vector<t_field*>& fields = ((t_struct*)type)->get_members();
@@ -546,7 +546,7 @@
   indent(out) << "$xfer += $input->readStructBegin(\\$fname);" << endl;
 
   // Loop over reading in fields
-  indent(out) << "while (1) " << endl;
+  indent(out) << "while (1)" << endl;
 
   scope_up(out);
 
@@ -758,7 +758,7 @@
 
   f_service_ << indent() << "$input->skip(Thrift::TType::STRUCT);" << endl << indent()
              << "$input->readMessageEnd();" << endl << indent()
-             << "my $x = new Thrift::TApplicationException('Function '.$fname.' not implemented.', "
+             << "my $x = Thrift::TApplicationException->new('Function '.$fname.' not implemented.', "
                 "Thrift::TApplicationException::UNKNOWN_METHOD);" << endl << indent()
              << "$output->writeMessageBegin($fname, Thrift::TMessageType::EXCEPTION, $rseqid);" << endl
              << indent() << "$x->write($output);" << endl << indent()
@@ -798,7 +798,7 @@
   string resultname = perl_namespace(tservice->get_program()) + service_name_ + "_"
                       + tfunction->get_name() + "_result";
 
-  f_service_ << indent() << "my $args = new " << argsname << "();" << endl << indent()
+  f_service_ << indent() << "my $args = " << argsname << "->new();" << endl << indent()
              << "$args->read($input);" << endl;
 
   f_service_ << indent() << "$input->readMessageEnd();" << endl;
@@ -809,7 +809,7 @@
 
   // Declare result for non oneway function
   if (!tfunction->is_oneway()) {
-    f_service_ << indent() << "my $result = new " << resultname << "();" << endl;
+    f_service_ << indent() << "my $result = " << resultname << "->new();" << endl;
   }
 
   // Try block for a function with exceptions
@@ -858,7 +858,7 @@
     f_service_ << indent() << "if ($@) {" << endl;
     indent_up();
     f_service_ << indent() << "$@ =~ s/^\\s+|\\s+$//g;" << endl
-               << indent() << "my $err = new Thrift::TApplicationException(\"Unexpected Exception: \" . $@, Thrift::TApplicationException::INTERNAL_ERROR);" << endl
+               << indent() << "my $err = Thrift::TApplicationException->new(\"Unexpected Exception: \" . $@, Thrift::TApplicationException::INTERNAL_ERROR);" << endl
                << indent() << "$output->writeMessageBegin('" << tfunction->get_name() << "', Thrift::TMessageType::EXCEPTION, $seqid);" << endl
                << indent() << "$err->write($output);" << endl
                << indent() << "$output->writeMessageEnd();" << endl
@@ -1106,7 +1106,7 @@
                << "', " << ((*f_iter)->is_oneway() ? "Thrift::TMessageType::ONEWAY" : "Thrift::TMessageType::CALL")
                << ", $self->{seqid});" << endl;
 
-    f_service_ << indent() << "my $args = new " << argsname << "();" << endl;
+    f_service_ << indent() << "my $args = " << argsname << "->new();" << endl;
 
     for (fld_iter = fields.begin(); fld_iter != fields.end(); ++fld_iter) {
       f_service_ << indent() << "$args->{" << (*fld_iter)->get_name() << "} = $"
@@ -1140,12 +1140,12 @@
 
       f_service_ << indent() << "$self->{input}->readMessageBegin(\\$fname, \\$mtype, \\$rseqid);"
                  << endl << indent() << "if ($mtype == Thrift::TMessageType::EXCEPTION) {" << endl
-                 << indent() << "  my $x = new Thrift::TApplicationException();" << endl << indent()
+                 << indent() << "  my $x = Thrift::TApplicationException->new();" << endl << indent()
                  << "  $x->read($self->{input});" << endl << indent()
                  << "  $self->{input}->readMessageEnd();" << endl << indent() << "  die $x;" << endl
                  << indent() << "}" << endl;
 
-      f_service_ << indent() << "my $result = new " << resultname << "();" << endl << indent()
+      f_service_ << indent() << "my $result = " << resultname << "->new();" << endl << indent()
                  << "$result->read($self->{input});" << endl;
 
       f_service_ << indent() << "$self->{input}->readMessageEnd();" << endl << endl;
@@ -1586,7 +1586,7 @@
       result += " = []";
     } else if (type->is_struct() || type->is_xception()) {
       if (obj) {
-        result += " = new " + perl_namespace(type->get_program()) + type->get_name() + "()";
+        result += " = " + perl_namespace(type->get_program()) + type->get_name() + "->new()";
       } else {
         result += " = undef";
       }
diff --git a/lib/perl/lib/Thrift/BinaryProtocol.pm b/lib/perl/lib/Thrift/BinaryProtocol.pm
index 61937e4..d62509a 100644
--- a/lib/perl/lib/Thrift/BinaryProtocol.pm
+++ b/lib/perl/lib/Thrift/BinaryProtocol.pm
@@ -39,7 +39,7 @@
 
 use constant VERSION_MASK   => 0xffff0000;
 use constant VERSION_1      => 0x80010000;
-use constant IS_BIG_ENDIAN  => unpack("h*", pack("s", 1)) =~ /01/;
+use constant IS_BIG_ENDIAN  => unpack('h*', pack('s', 1)) =~ m/01/;
 
 sub new
 {
@@ -67,7 +67,8 @@
     return 0;
 }
 
-sub writeStructBegin{
+sub writeStructBegin
+{
     my $self = shift;
     my $name = shift;
     return 0;
@@ -253,7 +254,7 @@
     my $result = $self->readI32(\$version);
     if (($version & VERSION_MASK) > 0) {
       if (($version & VERSION_MASK) != VERSION_1) {
-        die new Thrift::TProtocolException('Missing version identifier',
+        die Thrift::TProtocolException->new('Missing version identifier',
                                            Thrift::TProtocolException::BAD_VERSION);
       }
       $$type = $version & 0x000000ff;
@@ -261,7 +262,8 @@
           $result +
           $self->readString($name) +
           $self->readI32($seqid);
-    } else { # old client support code
+    }
+    else { # old client support code
       return
         $result +
         $self->readStringBody($name, $version) + # version here holds the size of the string
@@ -427,7 +429,7 @@
 
     my ($hi,$lo)=unpack('NN',$data);
 
-    my $vec = new Bit::Vector(64);
+    my $vec = Bit::Vector->new(64);
 
     $vec->Chunk_Store(32,32,$hi);
     $vec->Chunk_Store(32,0,$lo);
@@ -467,7 +469,8 @@
 
     if ($len) {
       $$value = $self->{trans}->readAll($len);
-    } else {
+    }
+    else {
       $$value = '';
     }
 
@@ -482,7 +485,8 @@
 
     if ($len) {
       $$value = $self->{trans}->readAll($len);
-    } else {
+    }
+    else {
       $$value = '';
     }
 
@@ -508,7 +512,7 @@
     my $self  = shift;
     my $trans = shift;
 
-    return new Thrift::BinaryProtocol($trans);
+    return Thrift::BinaryProtocol->new($trans);
 }
 
 1;
diff --git a/lib/perl/lib/Thrift/Exception.pm b/lib/perl/lib/Thrift/Exception.pm
index 5f0d8fb..e404068 100644
--- a/lib/perl/lib/Thrift/Exception.pm
+++ b/lib/perl/lib/Thrift/Exception.pm
@@ -29,11 +29,10 @@
 
 use overload '""' => sub {
     return
-          ref( $_[0] )
-        . " error: "
-        . ( $_[0]->{message} || 'empty message' )
-        . " (code "
-        . ( defined $_[0]->{code} ? $_[0]->{code} : 'undefined' ) . ")";
+        sprintf '%s error: %s (code %s)',
+          ref( $_[0] ),
+          ( $_[0]->{message} || 'empty message' ),
+          ( defined $_[0]->{code} ? $_[0]->{code} : 'undefined' );
     };
 
 sub new {
@@ -91,7 +90,8 @@
 
               if ($ftype == Thrift::TType::STRING) {
                   $xfer += $input->readString(\$self->{message});
-              } else {
+              }
+              else {
                   $xfer += $input->skip($ftype);
               }
 
@@ -101,7 +101,8 @@
           /2/ && do{
               if ($ftype == Thrift::TType::I32) {
                   $xfer += $input->readI32(\$self->{code});
-              } else {
+              }
+              else {
                   $xfer += $input->skip($ftype);
               }
               last;
diff --git a/lib/perl/lib/Thrift/FramedTransport.pm b/lib/perl/lib/Thrift/FramedTransport.pm
index ee842e6..ba89ba3 100644
--- a/lib/perl/lib/Thrift/FramedTransport.pm
+++ b/lib/perl/lib/Thrift/FramedTransport.pm
@@ -70,7 +70,7 @@
     my $self = shift;
 
     if (defined $self->{transport}) {
-      $self->{transport}->close();
+        $self->{transport}->close();
     }
 }
 
diff --git a/lib/perl/lib/Thrift/HttpClient.pm b/lib/perl/lib/Thrift/HttpClient.pm
index 6e6a631..40ec9ce 100644
--- a/lib/perl/lib/Thrift/HttpClient.pm
+++ b/lib/perl/lib/Thrift/HttpClient.pm
@@ -61,7 +61,7 @@
 
 sub setRecvTimeout
 {
-    warn "setRecvTimeout is deprecated - use setTimeout instead";
+    warn 'setRecvTimeout is deprecated - use setTimeout instead';
     # note: recvTimeout was never used so we do not need to do anything here
 }
 
@@ -70,7 +70,7 @@
     my $self    = shift;
     my $timeout = shift;
 
-    warn "setSendTimeout is deprecated - use setTimeout instead";
+    warn 'setSendTimeout is deprecated - use setTimeout instead';
 
     $self->setTimeout($timeout);
 }
@@ -102,8 +102,8 @@
 {
     my $self = shift;
     if (defined($self->{io})) {
-      close($self->{io});
-      $self->{io} = undef;
+        close($self->{io});
+        $self->{io} = undef;
     }
 }
 
@@ -121,7 +121,7 @@
     my $buf = $self->read($len);
 
     if (!defined($buf)) {
-      die new Thrift::TTransportException("TSocket: Could not read $len bytes from input buffer",
+        die Thrift::TTransportException->new("TSocket: Could not read $len bytes from input buffer",
                                           Thrift::TTransportException::END_OF_FILE);
     }
     return $buf;
@@ -140,17 +140,18 @@
     my $in = $self->{in};
 
     if (!defined($in)) {
-      die new Thrift::TTransportException("Response buffer is empty, no request.",
+        die Thrift::TTransportException->new('Response buffer is empty, no request.',
                                           Thrift::TTransportException::END_OF_FILE);
     }
     eval {
-      my $ret = sysread($in, $buf, $len);
-      if (! defined($ret)) {
-        die new Thrift::TTransportException("No more data available.",
+        my $ret = sysread($in, $buf, $len);
+        if (! defined($ret)) {
+            die Thrift::TTransportException->new('No more data available.',
                                             Thrift::TTransportException::TIMED_OUT);
-      }
-    }; if($@){
-      die new Thrift::TTransportException("$@", Thrift::TTransportException::UNKNOWN);
+        }
+    };
+    if($@){
+        die Thrift::TTransportException->new("$@", Thrift::TTransportException::UNKNOWN);
     }
 
     return $buf;
@@ -173,8 +174,9 @@
 {
     my $self = shift;
 
-    my $ua = LWP::UserAgent->new('timeout' => ($self->{timeout} / 1000),
-      'agent' => 'Perl/THttpClient'
+    my $ua = LWP::UserAgent->new(
+        'timeout' => ($self->{timeout} / 1000),
+        'agent'   => 'Perl/THttpClient'
      );
     $ua->default_header('Accept' => 'application/x-thrift');
     $ua->default_header('Content-Type' => 'application/x-thrift');
@@ -184,8 +186,7 @@
     $out->setpos(0); # rewind
     my $buf = join('', <$out>);
 
-    my $request = new HTTP::Request(POST => $self->{url}, undef, $buf);
-    map { $request->header($_ => $self->{headers}->{$_}) } keys %{$self->{headers}};
+    my $request = HTTP::Request->new(POST => $self->{url}, ($self->{headers} || undef), $buf);
     my $response = $ua->request($request);
     my $content_ref = $response->content_ref;
 
diff --git a/lib/perl/lib/Thrift/MemoryBuffer.pm b/lib/perl/lib/Thrift/MemoryBuffer.pm
index 1e51239..be97ce4 100644
--- a/lib/perl/lib/Thrift/MemoryBuffer.pm
+++ b/lib/perl/lib/Thrift/MemoryBuffer.pm
@@ -35,10 +35,10 @@
     my $bufferSize= shift || 1024;
 
     my $self = {
-        buffer    => '',
-        bufferSize=> $bufferSize,
-        wPos      => 0,
-        rPos      => 0,
+        buffer     => '',
+        bufferSize => $bufferSize,
+        wPos       => 0,
+        rPos       => 0,
     };
 
     return bless($self,$classname);
@@ -117,7 +117,7 @@
 
     my $avail = ($self->{wPos} - $self->{rPos});
     if ($avail < $len) {
-        die new TTransportException("Attempt to readAll($len) found only $avail available",
+        die TTransportException->new("Attempt to readAll($len) found only $avail available",
                                     Thrift::TTransportException::END_OF_FILE);
     }
 
diff --git a/lib/perl/lib/Thrift/MultiplexedProcessor.pm b/lib/perl/lib/Thrift/MultiplexedProcessor.pm
index 05c4ead..ae925d7 100644
--- a/lib/perl/lib/Thrift/MultiplexedProcessor.pm
+++ b/lib/perl/lib/Thrift/MultiplexedProcessor.pm
@@ -101,32 +101,32 @@
     $input->readMessageBegin(\$fname, \$mtype, \$rseqid);
 
     if ($mtype ne Thrift::TMessageType::CALL && $mtype ne Thrift::TMessageType::ONEWAY) {
-        die new Thrift::TException("This should not have happened!?");
+        die Thrift::TException->new('This should not have happened!?');
     }
 
     # Extract the service name and the new Message name.
     if (index($fname, Thrift::MultiplexedProtocol::SEPARATOR) == -1) {
         if (defined $self->{defaultProcessor}) {
             return $self->{defaultProcessor}->process(
-                new Thrift::StoredMessageProtocol($input, $fname, $mtype, $rseqid), $output
+                Thrift::StoredMessageProtocol->new($input, $fname, $mtype, $rseqid), $output
             );
         } else {
-            die new Thrift::TException("Service name not found in message name: {$fname} and no default processor defined. Did you " .
-                "forget to use a MultiplexProtocol in your client?");
+            die Thrift::TException->new("Service name not found in message name: {$fname} and no default processor defined. Did you " .
+                'forget to use a MultiplexProtocol in your client?');
         }
     }
 
     (my $serviceName, my $messageName) = split(':', $fname, 2);
 
     if (!exists($self->{serviceProcessorMap}->{$serviceName})) {
-        die new Thrift::TException("Service name not found: {$serviceName}.  Did you forget " .
-            "to call registerProcessor()?");
+        die Thrift::TException->new("Service name not found: {$serviceName}.  Did you forget " .
+            'to call registerProcessor()?');
     }
 
     # Dispatch processing to the stored processor
     my $processor = $self->{serviceProcessorMap}->{$serviceName};
     return $processor->process(
-        new Thrift::StoredMessageProtocol($input, $messageName, $mtype, $rseqid), $output
+        Thrift::StoredMessageProtocol->new($input, $messageName, $mtype, $rseqid), $output
     );
 }
 
diff --git a/lib/perl/lib/Thrift/MultiplexedProtocol.pm b/lib/perl/lib/Thrift/MultiplexedProtocol.pm
index 903211f..5b5b60b 100644
--- a/lib/perl/lib/Thrift/MultiplexedProtocol.pm
+++ b/lib/perl/lib/Thrift/MultiplexedProtocol.pm
@@ -53,7 +53,7 @@
 #
 sub writeMessageBegin
 {
-  my $self = shift;
+    my $self = shift;
     my ($name, $type, $seqid) = @_;
 
     if ($type == Thrift::TMessageType::CALL || $type == Thrift::TMessageType::ONEWAY) {
diff --git a/lib/perl/lib/Thrift/Protocol.pm b/lib/perl/lib/Thrift/Protocol.pm
index c681f60..26ef46a 100644
--- a/lib/perl/lib/Thrift/Protocol.pm
+++ b/lib/perl/lib/Thrift/Protocol.pm
@@ -81,14 +81,14 @@
 sub writeMessageBegin
 {
     my ($name, $type, $seqid);
-    die "abstract";
+    die 'abstract';
 }
 
 #
 # Close the message
 #
 sub writeMessageEnd {
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -101,7 +101,7 @@
 sub writeStructBegin {
     my ($name);
 
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -111,7 +111,7 @@
 # @return int How many bytes written
 #
 sub writeStructEnd {
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -126,79 +126,79 @@
 sub writeFieldBegin {
     my ($fieldName, $fieldType, $fieldId);
 
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeFieldEnd {
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeFieldStop {
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeMapBegin {
     my ($keyType, $valType, $size);
 
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeMapEnd {
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeListBegin {
     my ($elemType, $size);
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeListEnd {
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeSetBegin {
     my ($elemType, $size);
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeSetEnd {
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeBool {
     my ($bool);
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeByte {
     my ($byte);
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeI16 {
     my ($i16);
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeI32 {
     my ($i32);
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeI64 {
     my ($i64);
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeDouble {
     my ($dub);
-    die "abstract";
+    die 'abstract';
 }
 
 sub writeString
 {
     my ($str);
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -211,7 +211,7 @@
 sub readMessageBegin
 {
     my ($name, $type, $seqid);
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -219,105 +219,105 @@
 #
 sub readMessageEnd
 {
-    die "abstract";
+    die 'abstract';
 }
 
 sub readStructBegin
 {
     my($name);
 
-    die "abstract";
+    die 'abstract';
 }
 
 sub readStructEnd
 {
-    die "abstract";
+    die 'abstract';
 }
 
 sub readFieldBegin
 {
     my ($name, $fieldType, $fieldId);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readFieldEnd
 {
-    die "abstract";
+    die 'abstract';
 }
 
 sub readMapBegin
 {
     my ($keyType, $valType, $size);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readMapEnd
 {
-    die "abstract";
+    die 'abstract';
 }
 
 sub readListBegin
 {
     my ($elemType, $size);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readListEnd
 {
-    die "abstract";
+    die 'abstract';
 }
 
 sub readSetBegin
 {
     my ($elemType, $size);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readSetEnd
 {
-    die "abstract";
+    die 'abstract';
 }
 
 sub readBool
 {
     my ($bool);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readByte
 {
     my ($byte);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readI16
 {
     my ($i16);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readI32
 {
     my ($i32);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readI64
 {
     my ($i64);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readDouble
 {
     my ($dub);
-    die "abstract";
+    die 'abstract';
 }
 
 sub readString
 {
     my ($str);
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -405,7 +405,7 @@
         return $result;
     }
 
-    die new Thrift::TProtocolException("Type $type not recognized --- corrupt data?",
+    die Thrift::TProtocolException->new("Type $type not recognized --- corrupt data?",
                                        Thrift::TProtocolException::INVALID_DATA);
 
   }
@@ -424,7 +424,7 @@
 
     if($type == Thrift::TType::BOOL)
     {
-      return $itrans->readAll(1);
+        return $itrans->readAll(1);
     }
     elsif($type == Thrift::TType::BYTE)
     {
@@ -459,17 +459,17 @@
     {
         my $result = 0;
         while (1) {
-          my $ftype = 0;
-          my $fid = 0;
-          my $data = $itrans->readAll(1);
-          my @arr = unpack('c', $data);
-          $ftype = $arr[0];
-          if ($ftype == Thrift::TType::STOP) {
-            last;
-          }
-          # I16 field id
-          $result += $itrans->readAll(2);
-          $result += $self->skipBinary($itrans, $ftype);
+            my $ftype = 0;
+            my $fid = 0;
+            my $data = $itrans->readAll(1);
+            my @arr = unpack('c', $data);
+            $ftype = $arr[0];
+            if ($ftype == Thrift::TType::STOP) {
+                last;
+            }
+            # I16 field id
+            $result += $itrans->readAll(2);
+            $result += $self->skipBinary($itrans, $ftype);
         }
         return $result;
     }
@@ -517,7 +517,7 @@
         return $result;
     }
 
-    die new Thrift::TProtocolException("Type $type not recognized --- corrupt data?",
+    die Thrift::TProtocolException->new("Type $type not recognized --- corrupt data?",
                                        Thrift::TProtocolException::INVALID_DATA);
 }
 
@@ -542,7 +542,7 @@
 sub getProtocol
 {
     my ($trans);
-    die "interface";
+    die 'interface';
 }
 
 
diff --git a/lib/perl/lib/Thrift/SSLServerSocket.pm b/lib/perl/lib/Thrift/SSLServerSocket.pm
index d29671b..7b06431 100644
--- a/lib/perl/lib/Thrift/SSLServerSocket.pm
+++ b/lib/perl/lib/Thrift/SSLServerSocket.pm
@@ -48,7 +48,7 @@
 
 sub __client
 {
-  return new Thrift::SSLSocket();
+  return Thrift::SSLSocket->new();
 }
 
 sub __listen
diff --git a/lib/perl/lib/Thrift/SSLSocket.pm b/lib/perl/lib/Thrift/SSLSocket.pm
index 4bdf637..e34924d 100644
--- a/lib/perl/lib/Thrift/SSLSocket.pm
+++ b/lib/perl/lib/Thrift/SSLSocket.pm
@@ -34,7 +34,7 @@
 # Construction and usage
 #
 # my $opts = {}
-# my $socket = new Thrift::SSLSocket(\%opts);
+# my $socket = Thrift::SSLSocket->new(\%opts);
 #
 # options:
 #
diff --git a/lib/perl/lib/Thrift/Server.pm b/lib/perl/lib/Thrift/Server.pm
index f265d45..28822e8 100644
--- a/lib/perl/lib/Thrift/Server.pm
+++ b/lib/perl/lib/Thrift/Server.pm
@@ -51,7 +51,7 @@
 
     if (scalar @args == 2)
     {
-      $self = _init($args[0], $args[1],
+        $self = _init($args[0], $args[1],
                     Thrift::BufferedTransportFactory->new(),
                     Thrift::BufferedTransportFactory->new(),
                     Thrift::BinaryProtocolFactory->new(),
@@ -67,7 +67,7 @@
     }
     else
     {
-      die new Thrift::TException("Thrift::Server expects exactly 2, 4, or 6 args");
+      die Thrift::TException->new('Thrift::Server expects exactly 2, 4, or 6 args');
     }
 
     return bless($self,$classname);
@@ -94,7 +94,7 @@
 
 sub serve
 {
-    die "abstract";
+    die 'abstract';
 }
 
 sub _clientBegin
@@ -115,7 +115,7 @@
     my $self = shift;
     my $e    = shift;
 
-    if ($e->isa("Thrift::TException") and exists $e->{message}) {
+    if ($e->isa('Thrift::TException') and exists $e->{message}) {
         my $message = $e->{message};
         my $code    = $e->{code};
         my $out     = $code . ':' . $message;
@@ -123,10 +123,12 @@
         $message =~ m/TTransportException/ and die $out;
         if ($message =~ m/Socket/) {
             # suppress Socket messages
-        } else {
+        }
+        else {
             warn $out;
         }
-    } else {
+    }
+    else {
         warn $e;
     }
 }
@@ -151,7 +153,7 @@
 {
     my $self = shift;
     my $stop = 0;
-    
+
     $self->{serverTransport}->listen();
     while (!$stop) {
         my $client = $self->{serverTransport}->accept();
@@ -166,10 +168,10 @@
                 {
                     $self->{processor}->process($iprot, $oprot);
                 }
-            }; if($@) {
+            };
+            if($@) {
                 $self->_handleException($@);
             }
-
             $itrans->close();
             $otrans->close();
         } else {
@@ -184,7 +186,7 @@
 #
 package Thrift::ForkingServer;
 use parent -norequire, 'Thrift::Server';
-use POSIX ":sys_wait_h";
+use POSIX ':sys_wait_h';
 use version 0.77; our $VERSION = version->declare("$Thrift::VERSION");
 
 sub new
@@ -231,10 +233,12 @@
         if ($pid)
         {
             $self->_parent($pid, $itrans, $otrans);
-        } else {
+        }
+        else {
             $self->_child($itrans, $otrans, $iprot, $oprot);
         }
-    }; if($@) {
+    };
+    if($@) {
         $self->_handleException($@);
     }
 }
@@ -267,7 +271,8 @@
         {
             $self->{processor}->process($iprot, $oprot);
         }
-    }; if($@) {
+    };
+    if($@) {
         $ecode = 1;
         $self->_handleException($@);
     }
@@ -288,14 +293,16 @@
         {
           $file->close();
         }
-    }; if($@) {
-        if ($@->isa("Thrift::TException") and exists $@->{message}) {
+    };
+    if($@) {
+        if ($@->isa('Thrift::TException') and exists $@->{message}) {
             my $message = $@->{message};
             my $code    = $@->{code};
             my $out     = $code . ':' . $message;
 
             warn $out;
-        } else {
+        }
+        else {
             warn $@;
         }
     }
diff --git a/lib/perl/lib/Thrift/ServerSocket.pm b/lib/perl/lib/Thrift/ServerSocket.pm
index 2c4d906..3972643 100644
--- a/lib/perl/lib/Thrift/ServerSocket.pm
+++ b/lib/perl/lib/Thrift/ServerSocket.pm
@@ -38,7 +38,7 @@
 # @param[in]  host   host interface to listen on (undef = all interfaces)
 # @param[in]  port   port number to listen on (required)
 # @param[in]  queue  the listen queue size (default if not specified is 128)
-# @example    my $serversock = new Thrift::ServerSocket(host => undef, port => port)
+# @example    my $serversock = Thrift::ServerSocket->new(host => undef, port => port)
 #
 sub new
 {
@@ -49,7 +49,8 @@
     # Support both old-style "port number" construction and newer...
     if (ref($args) eq 'HASH') {
         $self = $args;
-    } else {
+    }
+    else {
         $self = { port => $args };
     }
 
@@ -71,7 +72,7 @@
             $self->{debugHandler}->($error);
         }
 
-        die new Thrift::TTransportException($error, Thrift::TTransportException::NOT_OPEN);
+        die Thrift::TTransportException->new($error, Thrift::TTransportException::NOT_OPEN);
     };
 
     $self->{handle} = $sock;
@@ -84,7 +85,7 @@
     if ( exists $self->{handle} and defined $self->{handle} ) {
         my $client        = $self->{handle}->accept();
         my $result        = $self->__client();
-        $result->{handle} = new IO::Select($client);
+        $result->{handle} = IO::Select->new($client);
         return $result;
     }
 
@@ -93,12 +94,12 @@
 
 sub close
 {
-	my $self = shift;
-	
+    my $self = shift;
+
     if ( exists $self->{handle} and defined $self->{handle} )
     {
         $self->{handle}->close();
-	}
+    }
 }
 
 ###
@@ -107,7 +108,7 @@
 
 sub __client
 {
-  return new Thrift::Socket();
+  return Thrift::Socket->new();
 }
 
 sub __listen
diff --git a/lib/perl/lib/Thrift/Socket.pm b/lib/perl/lib/Thrift/Socket.pm
index ae248df..ba0db5e 100644
--- a/lib/perl/lib/Thrift/Socket.pm
+++ b/lib/perl/lib/Thrift/Socket.pm
@@ -36,7 +36,7 @@
 # Construction and usage
 #
 # my $opts = {}
-# my $socket = new Thrift::Socket(\%opts);
+# my $socket = Thrift::Socket->new(\%opts);
 #
 # options:
 #
@@ -120,10 +120,10 @@
 
     my $sock = $self->__open() || do {
         my $error = ref($self).': Could not connect to '.$self->{host}.':'.$self->{port}.' ('.$!.')';
-        die new Thrift::TTransportException($error, Thrift::TTransportException::NOT_OPEN);
+        die Thrift::TTransportException->new($error, Thrift::TTransportException::NOT_OPEN);
     };
 
-    $self->{handle} = new IO::Select( $sock );
+    $self->{handle} = IO::Select->new( $sock );
 }
 
 #
@@ -159,15 +159,17 @@
 
         if (!defined $buf || $buf eq '') {
 
-            die new Thrift::TTransportException(ref($self).': Could not read '.$len.' bytes from '.
+            die Thrift::TTransportException->new(ref($self).': Could not read '.$len.' bytes from '.
                                $self->{host}.':'.$self->{port}, Thrift::TTransportException::END_OF_FILE);
 
-        } elsif ((my $sz = length($buf)) < $len) {
+        }
+        elsif ((my $sz = length($buf)) < $len) {
 
             $pre .= $buf;
             $len -= $sz;
 
-        } else {
+        }
+        else {
             return $pre.$buf;
         }
     }
@@ -191,7 +193,7 @@
 
     if (!defined $buf || $buf eq '') {
 
-        die new Thrift::TTransportException(ref($self).': Could not read '.$len.' bytes from '.
+        die Thrift::TTransportException->new(ref($self).': Could not read '.$len.' bytes from '.
                            $self->{host}.':'.$self->{port}, Thrift::TTransportException::END_OF_FILE);
 
     }
@@ -217,7 +219,7 @@
         my @sockets = $self->{handle}->can_write( $self->{sendTimeout} / 1000 );
 
         if(@sockets == 0){
-            die new Thrift::TTransportException(ref($self).': timed out writing to bytes from '.
+            die Thrift::TTransportException->new(ref($self).': timed out writing to bytes from '.
                                        $self->{host}.':'.$self->{port}, Thrift::TTransportException::TIMED_OUT);
         }
 
@@ -225,7 +227,7 @@
 
         if (!defined $sent || $sent == 0 ) {
 
-            die new Thrift::TTransportException(ref($self).': Could not write '.length($buf).' bytes '.
+            die Thrift::TTransportException->new(ref($self).': Could not write '.length($buf).' bytes '.
                                  $self->{host}.':'.$self->{host}, Thrift::TTransportException::END_OF_FILE);
 
         }
@@ -314,7 +316,7 @@
     my @sockets = $self->{handle}->can_read( $self->{recvTimeout} / 1000 );
 
     if (@sockets == 0) {
-        die new Thrift::TTransportException(ref($self).': timed out reading from '.
+        die Thrift::TTransportException->new(ref($self).': timed out reading from '.
                                    $self->{host}.':'.$self->{port}, Thrift::TTransportException::TIMED_OUT);
     }
 
diff --git a/lib/perl/lib/Thrift/Transport.pm b/lib/perl/lib/Thrift/Transport.pm
index 10c8ce2..41b7e15 100644
--- a/lib/perl/lib/Thrift/Transport.pm
+++ b/lib/perl/lib/Thrift/Transport.pm
@@ -54,7 +54,7 @@
 #
 sub isOpen
 {
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -64,7 +64,7 @@
 #
 sub open
 {
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -72,7 +72,7 @@
 #
 sub close
 {
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -84,7 +84,7 @@
 #
 sub read
 {
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -116,7 +116,7 @@
 #
 sub write
 {
-    die "abstract";
+    die 'abstract';
 }
 
 #
@@ -162,17 +162,17 @@
 
 sub listen
 {
-    die "abstract";
+    die 'abstract';
 }
 
 sub accept
 {
-    die "abstract";
+    die 'abstract';
 }
 
 sub close
 {
-    die "abstract";
+    die 'abstract';
 }
 
 
diff --git a/lib/perl/lib/Thrift/UnixServerSocket.pm b/lib/perl/lib/Thrift/UnixServerSocket.pm
index 7b857ce..875e804 100644
--- a/lib/perl/lib/Thrift/UnixServerSocket.pm
+++ b/lib/perl/lib/Thrift/UnixServerSocket.pm
@@ -37,8 +37,8 @@
 # If a single argument is given that is a hash:
 # @param[in]  path   unix domain socket file name
 # @param[in]  queue  the listen queue size (default is not specified is supplied by ServerSocket)
-# @example    my $serversock = new Thrift::UnixServerSocket($path);
-# @example    my $serversock = new Thrift::UnixServerSocket(path => "somepath", queue => 64);
+# @example    my $serversock = Thrift::UnixServerSocket->new($path);
+# @example    my $serversock = Thrift::UnixServerSocket->new(path => "somepath", queue => 64);
 #
 sub new
 {
@@ -58,7 +58,7 @@
 
 sub __client
 {
-  return new Thrift::UnixSocket();
+  return Thrift::UnixSocket->new();
 }
 
 sub __listen
@@ -75,7 +75,7 @@
         if ($self->{debug}) {
             $self->{debugHandler}->($error);
         }
-        die new Thrift::TTransportException($error, Thrift::TTransportException::NOT_OPEN);
+        die Thrift::TTransportException->new($error, Thrift::TTransportException::NOT_OPEN);
     };
 
     return $sock;
diff --git a/lib/perl/lib/Thrift/UnixSocket.pm b/lib/perl/lib/Thrift/UnixSocket.pm
index 8b00450..ba386d1 100644
--- a/lib/perl/lib/Thrift/UnixSocket.pm
+++ b/lib/perl/lib/Thrift/UnixSocket.pm
@@ -35,7 +35,7 @@
 # Takes a unix domain socket filename.
 # See Thrift::Socket for base class parameters.
 # @param[in]  path   path to unix socket file
-# @example    my $sock = new Thrift::UnixSocket($path);
+# @example    my $sock = Thrift::UnixSocket->new($path);
 #
 sub new
 {
@@ -58,7 +58,7 @@
         if ($self->{debug}) {
             $self->{debugHandler}->($error);
         }
-        die new Thrift::TTransportException($error, Thrift::TTransportException::NOT_OPEN);
+        die Thrift::TTransportException->new($error, Thrift::TTransportException::NOT_OPEN);
     };
 
     return $sock;
diff --git a/test/perl/TestClient.pl b/test/perl/TestClient.pl
index 990274c..96e3bec 100755
--- a/test/perl/TestClient.pl
+++ b/test/perl/TestClient.pl
@@ -45,7 +45,7 @@
 $|++;
 
 sub usage {
-    print <<EOF;
+    print <<"EOF";
 Usage: $0 [OPTIONS]
 
 Options:                          (default)
@@ -91,20 +91,24 @@
 }
 
 my $socket = undef;
-if ($opts{"domain-socket"}) {
-    $socket = new Thrift::UnixSocket($opts{"domain-socket"});
-} elsif ($opts{ssl}) {
-  $socket = new Thrift::SSLSocket(\%opts);
-} else {
-  $socket = new Thrift::Socket($opts{host}, $opts{port});
+if ($opts{'domain-socket'}) {
+    $socket = Thrift::UnixSocket->new($opts{'domain-socket'});
+}
+elsif ($opts{ssl}) {
+  $socket = Thrift::SSLSocket->new(\%opts);
+}
+else {
+  $socket = Thrift::Socket->new($opts{host}, $opts{port});
 }
 
 my $transport;
 if ($opts{transport} eq 'buffered') {
-    $transport = new Thrift::BufferedTransport($socket, 1024, 1024);
-} elsif ($opts{transport} eq 'framed') {
-    $transport = new Thrift::FramedTransport($socket);
-} else {
+    $transport = Thrift::BufferedTransport->new($socket, 1024, 1024);
+}
+elsif ($opts{transport} eq 'framed') {
+    $transport = Thrift::FramedTransport->new($socket);
+}
+else {
     usage();
     exit 1;
 }
@@ -112,20 +116,21 @@
 my $protocol;
 my $protocol2;
 if ($opts{protocol} eq 'binary' || $opts{protocol} eq 'multi') {
-    $protocol = new Thrift::BinaryProtocol($transport);
-} else {
+    $protocol = Thrift::BinaryProtocol->new($transport);
+}
+else {
     usage();
     exit 1;
 }
 
 my $secondService = undef;
 if (index($opts{protocol}, 'multi') == 0) {
-  $protocol2 = new Thrift::MultiplexedProtocol($protocol, "SecondService");
-  $protocol = new Thrift::MultiplexedProtocol($protocol, "ThriftTest");
-  $secondService = new ThriftTest::SecondServiceClient($protocol2);
+  $protocol2     = Thrift::MultiplexedProtocol->new($protocol, 'SecondService');
+  $protocol      = Thrift::MultiplexedProtocol->new($protocol, 'ThriftTest');
+  $secondService = ThriftTest::SecondServiceClient->new($protocol2);
 }
 
-my $testClient = new ThriftTest::ThriftTestClient($protocol);
+my $testClient = ThriftTest::ThriftTestClient->new($protocol);
 
 eval {
   $transport->open();
@@ -146,52 +151,52 @@
 #
 # VOID TEST
 #
-print("testVoid()");
+print('testVoid()');
 $testClient->testVoid();
 print(" = void\n");
 
 #
 # STRING TEST
 #
-print("testString(\"Test\")");
-my $s = $testClient->testString("Test");
-print(" = \"$s\"\n");
+print('testString("Test")');
+my $s = $testClient->testString('Test');
+print(qq| = "$s"\n|);
 exit(ERR_BASETYPES) if ($s ne 'Test');
 
 #
 # MULTIPLEXED TEST
 #
 if (index($opts{protocol}, 'multi') == 0) {
-    print("secondtestString(\"Test2\")");
-    $s = $secondService->secondtestString("Test2");
-    print(" = \"$s\"\n");
+    print('secondtestString("Test2")');
+    $s = $secondService->secondtestString('Test2');
+    print(qq| = "$s"\n|);
     exit(ERR_PROTOCOL) if ($s ne 'testString("Test2")');
 }
 
 #
 # BOOL TEST
 #
-print("testBool(1)");
+print('testBool(1)');
 my $t = $testClient->testBool(1);
 print(" = $t\n");
 exit(ERR_BASETYPES) if ($t ne 1);
-print("testBool(0)");
+print('testBool(0)');
 my $f = $testClient->testBool(0);
 print(" = $f\n");
-exit(ERR_BASETYPES) if ($f ne "");
+exit(ERR_BASETYPES) if ($f ne q||);
 
 
 #
 # BYTE TEST
 #
-print("testByte(1)");
+print('testByte(1)');
 my $u8 = $testClient->testByte(1);
 print(" = $u8\n");
 
 #
 # I32 TEST
 #
-print("testI32(-1)");
+print('testI32(-1)');
 my $i32 = $testClient->testI32(-1);
 print(" = $i32\n");
 exit(ERR_BASETYPES) if ($i32 ne -1);
@@ -199,7 +204,7 @@
 #
 # I64 TEST
 #
-print("testI64(-34359738368)");
+print('testI64(-34359738368)');
 my $i64 = $testClient->testI64(-34359738368);
 print(" = $i64\n");
 exit(ERR_BASETYPES) if ($i64 ne -34359738368);
@@ -207,7 +212,7 @@
 #
 # DOUBLE TEST
 #
-print("testDouble(-852.234234234)");
+print('testDouble(-852.234234234)');
 my $dub = $testClient->testDouble(-852.234234234);
 print(" = $dub\n");
 exit(ERR_BASETYPES) if ($dub ne -852.234234234);
@@ -220,33 +225,33 @@
 #
 # STRUCT TEST
 #
-print("testStruct({\"Zero\", 1, -3, -5})");
-my $out = new ThriftTest::Xtruct();
-$out->string_thing("Zero");
+print('testStruct({"Zero", 1, -3, -5})');
+my $out = ThriftTest::Xtruct->new();
+$out->string_thing('Zero');
 $out->byte_thing(1);
 $out->i32_thing(-3);
 $out->i64_thing(-5);
 my $in = $testClient->testStruct($out);
-print(" = {\"".$in->string_thing."\", ".
-        $in->byte_thing.", ".
-        $in->i32_thing.", ".
+print(' = {"'.$in->string_thing.'", '.
+        $in->byte_thing.', '.
+        $in->i32_thing.', '.
         $in->i64_thing."}\n");
 
 #
 # NESTED STRUCT TEST
 #
-print("testNest({1, {\"Zero\", 1, -3, -5}, 5}");
-my $out2 = new ThriftTest::Xtruct2();
+print('testNest({1, {"Zero", 1, -3, -5}, 5}');
+my $out2 = ThriftTest::Xtruct2->new();
 $out2->byte_thing(1);
 $out2->struct_thing($out);
 $out2->i32_thing(5);
 my $in2 = $testClient->testNest($out2);
 $in = $in2->struct_thing;
-print(" = {".$in2->byte_thing.", {\"".
-      $in->string_thing."\", ".
-      $in->byte_thing.", ".
-      $in->i32_thing.", ".
-      $in->i64_thing."}, ".
+print(' = {'.$in2->byte_thing.', {"'.
+      $in->string_thing.'", '.
+      $in->byte_thing.', '.
+      $in->i32_thing.', '.
+      $in->i64_thing.'}, '.
       $in2->i32_thing."}\n");
 
 #
@@ -256,28 +261,30 @@
 for (my $i = 0; $i < 5; ++$i) {
   $mapout->{$i} = $i-10;
 }
-print("testMap({");
+print('testMap({');
 my $first = 1;
 while( my($key,$val) = each %$mapout) {
     if ($first) {
         $first = 0;
-    } else {
-        print(", ");
+    }
+    else {
+        print(', ');
     }
     print("$key => $val");
 }
-print("})");
+print('})');
 
 
 my $mapin = $testClient->testMap($mapout);
-print(" = {");
+print(' = {');
 
 $first = 1;
 while( my($key,$val) = each %$mapin){
     if ($first) {
         $first = 0;
-    } else {
-        print(", ");
+    }
+    else {
+        print(', ');
     }
     print("$key => $val");
 }
@@ -291,11 +298,11 @@
     push(@$setout, $i);
 }
 
-print("testSet({".join(",",@$setout)."})");
+print('testSet({'.join(',',@$setout).'})');
 
 my $setin = $testClient->testSet($setout);
 
-print(" = {".join(",",@$setout)."}\n");
+print(' = {'.join(',',@$setout)."}\n");
 
 #
 # LIST TEST
@@ -305,111 +312,111 @@
     push(@$listout, $i);
 }
 
-print("testList({".join(",",@$listout)."})");
+print('testList({'.join(',',@$listout).'})');
 
 my $listin = $testClient->testList($listout);
 
-print(" = {".join(",",@$listin)."}\n");
+print(' = {'.join(',',@$listin)."}\n");
 
 #
 # ENUM TEST
 #
-print("testEnum(ONE)");
+print('testEnum(ONE)');
 my $ret = $testClient->testEnum(ThriftTest::Numberz::ONE);
 print(" = $ret\n");
 
-print("testEnum(TWO)");
+print('testEnum(TWO)');
 $ret = $testClient->testEnum(ThriftTest::Numberz::TWO);
 print(" = $ret\n");
 
-print("testEnum(THREE)");
+print('testEnum(THREE)');
 $ret = $testClient->testEnum(ThriftTest::Numberz::THREE);
 print(" = $ret\n");
 
-print("testEnum(FIVE)");
+print('testEnum(FIVE)');
 $ret = $testClient->testEnum(ThriftTest::Numberz::FIVE);
 print(" = $ret\n");
 
-print("testEnum(EIGHT)");
+print('testEnum(EIGHT)');
 $ret = $testClient->testEnum(ThriftTest::Numberz::EIGHT);
 print(" = $ret\n");
 
 #
 # TYPEDEF TEST
 #
-print("testTypedef(309858235082523)");
+print('testTypedef(309858235082523)');
 my $uid = $testClient->testTypedef(309858235082523);
 print(" = $uid\n");
 
 #
 # NESTED MAP TEST
 #
-print("testMapMap(1)");
+print('testMapMap(1)');
 my $mm = $testClient->testMapMap(1);
-print(" = {");
+print(' = {');
 while( my ($key,$val) = each %$mm) {
     print("$key => {");
     while( my($k2,$v2) = each %$val) {
         print("$k2 => $v2, ");
     }
-    print("}, ");
+    print('}, ');
 }
 print("}\n");
 
 #
 # INSANITY TEST
 #
-my $insane = new ThriftTest::Insanity();
+my $insane = ThriftTest::Insanity->new();
 $insane->{userMap}->{ThriftTest::Numberz::FIVE} = 5000;
-my $truck = new ThriftTest::Xtruct();
-$truck->string_thing("Hello2");
+my $truck = ThriftTest::Xtruct->new();
+$truck->string_thing('Hello2');
 $truck->byte_thing(2);
 $truck->i32_thing(2);
 $truck->i64_thing(2);
-my $truck2 = new ThriftTest::Xtruct();
-$truck2->string_thing("Goodbye4");
+my $truck2 = ThriftTest::Xtruct->new();
+$truck2->string_thing('Goodbye4');
 $truck2->byte_thing(4);
 $truck2->i32_thing(4);
 $truck2->i64_thing(4);
 push(@{$insane->{xtructs}}, $truck);
 push(@{$insane->{xtructs}}, $truck2);
 
-print("testInsanity()");
+print('testInsanity()');
 my $whoa = $testClient->testInsanity($insane);
-print(" = {");
+print(' = {');
 while( my ($key,$val) = each %$whoa) {
     print("$key => {");
     while( my($k2,$v2) = each %$val) {
         print("$k2 => {");
         my $userMap = $v2->{userMap};
-        print("{");
-        if (ref($userMap) eq "HASH") {
+        print('{');
+        if (ref($userMap) eq 'HASH') {
             while( my($k3,$v3) = each %$userMap) {
                 print("$k3 => $v3, ");
             }
         }
-        print("}, ");
+        print('}, ');
 
         my $xtructs = $v2->{xtructs};
-        print("{");
-        if (ref($xtructs) eq "ARRAY") {
+        print('{');
+        if (ref($xtructs) eq 'ARRAY') {
             foreach my $x (@$xtructs) {
-                print("{\"".$x->{string_thing}."\", ".
-                      $x->{byte_thing}.", ".$x->{i32_thing}.", ".$x->{i64_thing}."}, ");
+                print('{"'.$x->{string_thing}.'", '.
+                      $x->{byte_thing}.', '.$x->{i32_thing}.', '.$x->{i64_thing}.'}, ');
             }
         }
-        print("}");
+        print('}');
 
-        print("}, ");
+        print('}, ');
     }
-    print("}, ");
+    print('}, ');
 }
 print("}\n");
 
 #
 # EXCEPTION TEST
 #
-print("testException('Xception')");
+print(q|testException('Xception')|);
 eval {
     $testClient->testException('Xception');
     print("  void\nFAILURE\n");
@@ -422,7 +429,7 @@
 # Normal tests done.
 #
 my $stop = gettimeofday();
-my $elp  = sprintf("%d",1000*($stop - $start), 0);
+my $elp  = sprintf('%d',1000*($stop - $start), 0);
 print("Total time: $elp ms\n");
 
 #
diff --git a/test/perl/TestServer.pl b/test/perl/TestServer.pl
index e8c1cfa..d2b9a38 100644
--- a/test/perl/TestServer.pl
+++ b/test/perl/TestServer.pl
@@ -27,7 +27,7 @@
 use Time::HiRes qw(gettimeofday);
 
 $SIG{INT} = \&sigint_handler;
- 
+
 use lib '../../lib/perl/lib';
 use lib 'gen-perl';
 
@@ -48,7 +48,7 @@
 $|++;
 
 sub usage {
-    print <<EOF;
+    print <<"EOF";
 Usage: $0 [OPTIONS]
 
 Options:                          (default)
@@ -99,54 +99,60 @@
     exit 1;
 }
 
-my $handler = new ThriftTestHandler();
-my $handler2 = new SecondServiceHandler();
-my $processor = new ThriftTest::ThriftTestProcessor($handler);
-my $processor2 = new ThriftTest::SecondServiceProcessor($handler2);
+my $handler    = ThriftTestHandler->new();
+my $handler2   = SecondServiceHandler->new();
+my $processor  = ThriftTest::ThriftTestProcessor->new($handler);
+my $processor2 = ThriftTest::SecondServiceProcessor->new($handler2);
+
 my $serversocket;
-if ($opts{"domain-socket"}) {
-    unlink($opts{"domain-socket"});
-    $serversocket = new Thrift::UnixServerSocket($opts{"domain-socket"});
-} elsif ($opts{ssl}) {
-    $serversocket = new Thrift::SSLServerSocket(\%opts);
-} else {
-    $serversocket = new Thrift::ServerSocket(\%opts);
+if ($opts{'domain-socket'}) {
+    unlink($opts{'domain-socket'});
+    $serversocket = Thrift::UnixServerSocket->new($opts{'domain-socket'});
+}
+elsif ($opts{ssl}) {
+    $serversocket = Thrift::SSLServerSocket->new(\%opts);
+}
+else {
+    $serversocket = Thrift::ServerSocket->new(\%opts);
 }
 my $transport;
 if ($opts{transport} eq 'buffered') {
-    $transport = new Thrift::BufferedTransportFactory();
-} elsif ($opts{transport} eq 'framed') {
-    $transport = new Thrift::FramedTransportFactory();
-} else {
+    $transport = Thrift::BufferedTransportFactory->new();
+}
+elsif ($opts{transport} eq 'framed') {
+    $transport = Thrift::FramedTransportFactory->new();
+}
+else {
     usage();
     exit 1;
 }
 my $protocol;
 if ($opts{protocol} eq 'binary' || $opts{protocol} eq 'multi') {
-    $protocol = new Thrift::BinaryProtocolFactory();
-} else {
+    $protocol = Thrift::BinaryProtocolFactory->new();
+}
+else {
     usage();
     exit 1;
 }
 
 if (index($opts{protocol}, 'multi') == 0) {
-  my $newProcessor = new Thrift::MultiplexedProcessor($protocol);
+  my $newProcessor = Thrift::MultiplexedProcessor->new($protocol);
   $newProcessor->defaultProcessor($processor);
-  $newProcessor->registerProcessor("ThriftTest", $processor);
-  $newProcessor->registerProcessor("SecondService", $processor2);
+  $newProcessor->registerProcessor('ThriftTest', $processor);
+  $newProcessor->registerProcessor('SecondService', $processor2);
   $processor = $newProcessor;
 }
 
 my $ssltag = '';
 if ($opts{ssl}) {
-    $ssltag = "(SSL)";
+    $ssltag = '(SSL)';
 }
 my $listening_on = "$opts{port} $ssltag";
-if ($opts{"domain-socket"}) {
-    $listening_on = $opts{"domain-socket"};
+if ($opts{'domain-socket'}) {
+    $listening_on = $opts{'domain-socket'};
 }
-my $server = new Thrift::SimpleServer($processor, $serversocket, $transport, $protocol);
-print "Starting \"simple\" server ($opts{transport}/$opts{protocol}) listen on: $listening_on\n";
+my $server = Thrift::SimpleServer->new($processor, $serversocket, $transport, $protocol);
+print qq|Starting "simple" server ($opts{transport}/$opts{protocol}) listen on: $listening_on\n|;
 $server->serve();
 print "done.\n";
 
@@ -169,70 +175,67 @@
     return bless($self, $classname);
 }
 
-sub testVoid() {
+sub testVoid {
   print("testVoid()\n");
 }
 
-sub testString() {
+sub testString {
   my $self = shift;
   my $thing = shift;
   print("testString($thing)\n");
   return $thing;
 }
 
-sub testBool() {
+sub testBool {
   my $self = shift;
   my $thing = shift;
-  my $str = $thing ? "true" : "false";
+  my $str = $thing ? 'true' : 'false';
   print("testBool($str)\n");
   return $thing;
 }
 
-sub testByte() {
+sub testByte {
   my $self = shift;
   my $thing = shift;
   print("testByte($thing)\n");
   return $thing;
 }
 
-sub testI32() {
+sub testI32 {
   my $self = shift;
   my $thing = shift;
   print("testI32($thing)\n");
   return $thing;
 }
 
-sub testI64() {
+sub testI64 {
   my $self = shift;
   my $thing = shift;
   print("testI64($thing)\n");
   return $thing;
 }
 
-sub testDouble() {
+sub testDouble {
   my $self = shift;
   my $thing = shift;
   print("testDouble($thing)\n");
   return $thing;
 }
 
-sub testBinary() {
+sub testBinary {
     my $self = shift;
     my $thing = shift;
     my @bytes = split //, $thing;
-    print("testBinary(");
-    foreach (@bytes)
-    {
-        printf "%02lx", ord $_;
-    }
-    print(")\n");
+    print 'testBinary(';
+    printf( '%02lx', ord $_ ) foreach (@bytes);
+    print ")\n";
     return $thing;
 }
 
-sub testStruct() {
+sub testStruct {
   my $self = shift;
   my $thing = shift;
-  printf("testStruct({\"%s\", %d, %d, %lld})\n",
+  printf(qq|testStruct({"%s", %d, %d, %lld})\n|,
            $thing->{string_thing},
            $thing->{byte_thing},
            $thing->{i32_thing},
@@ -240,11 +243,11 @@
   return $thing;
 }
 
-sub testNest() {
+sub testNest {
   my $self = shift;
   my $nest = shift;
   my $thing = $nest->{struct_thing};
-  printf("testNest({%d, {\"%s\", %d, %d, %lld}, %d})\n",
+  printf(qq|testNest({%d, {"%s", %d, %d, %lld}, %d})\n|,
            $nest->{byte_thing},
            $thing->{string_thing},
            $thing->{byte_thing},
@@ -254,92 +257,58 @@
   return $nest;
 }
 
-sub testMap() {
+sub testMap {
   my $self = shift;
   my $thing = shift;
-  print("testMap({");
-  my $first = 1;
-  foreach my $key (keys %$thing) {
-    if ($first) {
-        $first = 0;
-    } else {
-        print(", ");
-    }
-    print("$key => $thing->{$key}");
-  }
-  print("})\n");
+  printf "testMap({%s})\n",
+    join( ', ',
+          map { $_ . ' => ' . $thing->{$_} }
+          sort keys %$thing
+    );
   return $thing;
 }
 
-sub testStringMap() {
+sub testStringMap {
   my $self = shift;
   my $thing = shift;
-  print("testStringMap({");
-  my $first = 1;
-  foreach my $key (keys %$thing) {
-    if ($first) {
-        $first = 0;
-    } else {
-        print(", ");
-    }
-    print("$key => $thing->{$key}");
-  }
-  print("})\n");
+  printf "testStringMap({%s})\n",
+    join( ', ',
+          map { $_ . ' => ' . $thing->{$_} }
+          sort keys %$thing
+    );
   return $thing;
 }
 
-sub testSet() {
+sub testSet {
   my $self = shift;
   my $thing = shift;
-  my @arr;
-  my $result = \@arr;
-  print("testSet({");
-  my $first = 1;
-  foreach my $key (keys %$thing) {
-    if ($first) {
-        $first = 0;
-    } else {
-        print(", ");
-    }
-    print("$key");
-    push(@arr, $key);
-  }
-  print("})\n");
-  return $result;
+  my @result = sort keys %$thing;
+  printf "testSet({%s})\n", join(', ', @result );
+  return \@result;
 }
 
-sub testList() {
+sub testList {
   my $self = shift;
   my $thing = shift;
-  print("testList({");
-  my $first = 1;
-  foreach my $key (@$thing) {
-    if ($first) {
-        $first = 0;
-    } else {
-        print(", ");
-    }
-    print("$key");
-  }
-  print("})\n");
+  print "testList({%s})\n", join(', ', @$thing);
   return $thing;
 }
 
-sub testEnum() {
+sub testEnum {
   my $self = shift;
   my $thing = shift;
-  print("testEnum($thing)\n");
+  print "testEnum($thing)\n";
   return $thing;
 }
 
-sub testTypedef() {
+sub testTypedef {
   my $self = shift;
   my $thing = shift;
   print("testTypedef($thing)\n");
   return $thing;
 }
 
-sub testMapMap() {
+sub testMapMap {
   my $self = shift;
   my $hello = shift;
 
@@ -348,25 +317,25 @@
   return $result;
 }
 
-sub testInsanity() {
+sub testInsanity {
   my $self = shift;
   my $argument = shift;
   print("testInsanity()\n");
 
-  my $hello = new ThriftTest::Xtruct({string_thing => "Hello2", byte_thing => 2, i32_thing => 2, i64_thing => 2});
+  my $hello = ThriftTest::Xtruct->new({string_thing => 'Hello2', byte_thing => 2, i32_thing => 2, i64_thing => 2});
   my @hellos;
   push(@hellos, $hello);
-  my $goodbye = new ThriftTest::Xtruct({string_thing => "Goodbye4", byte_thing => 4, i32_thing => 4, i64_thing => 4});
+  my $goodbye = ThriftTest::Xtruct->new({string_thing => 'Goodbye4', byte_thing => 4, i32_thing => 4, i64_thing => 4});
   my @goodbyes;
   push(@goodbyes, $goodbye);
-  my $crazy = new ThriftTest::Insanity({userMap => { ThriftTest::Numberz::EIGHT => 8 }, xtructs => \@goodbyes});
-  my $loony = new ThriftTest::Insanity();
+  my $crazy = ThriftTest::Insanity->new({userMap => { ThriftTest::Numberz::EIGHT => 8 }, xtructs => \@goodbyes});
+  my $loony = ThriftTest::Insanity->new();
   my $result = { 1 => { ThriftTest::Numberz::TWO => $argument, ThriftTest::Numberz::THREE => $argument },
                  2 => { ThriftTest::Numberz::SIX => $loony } };
   return $result;
 }
 
-sub testMulti() {
+sub testMulti {
   my $self = shift;
   my $arg0 = shift;
   my $arg1 = shift;
@@ -376,39 +345,43 @@
   my $arg5 = shift;
 
   print("testMulti()\n");
-  return new ThriftTest::Xtruct({string_thing => "Hello2", byte_thing => $arg0, i32_thing => $arg1, i64_thing => $arg2});
+  return ThriftTest::Xtruct->new({string_thing => 'Hello2', byte_thing => $arg0, i32_thing => $arg1, i64_thing => $arg2});
 }
 
-sub testException() {
+sub testException {
   my $self = shift;
   my $arg = shift;
   print("testException($arg)\n");
-  if ($arg eq "Xception") {
-    die new ThriftTest::Xception({errorCode => 1001, message => $arg});
-  } elsif ($arg eq "TException") {
-    die "astring"; # all unhandled exceptions become TExceptions
-  } else {
-    return new ThriftTest::Xtruct({string_thing => $arg});
+  if ($arg eq 'Xception') {
+      die ThriftTest::Xception->new({errorCode => 1001, message => $arg});
+  }
+  elsif ($arg eq 'TException') {
+      die 'astring'; # all unhandled exceptions become TExceptions
+  }
+  else {
+      return ThriftTest::Xtruct->new({string_thing => $arg});
   }
 }
 
-sub testMultiException() {
+sub testMultiException {
   my $self = shift;
   my $arg0 = shift;
   my $arg1 = shift;
 
   printf("testMultiException(%s, %s)\n", $arg0, $arg1);
-  if ($arg0 eq "Xception") {
-    die new ThriftTest::Xception({errorCode => 1001, message => "This is an Xception"});
-  } elsif ($arg0 eq "Xception2") {
-    my $struct_thing = new ThriftTest::Xtruct({string_thing => "This is an Xception2"});
-    die new ThriftTest::Xception2({errorCode => 2002, struct_thing => $struct_thing});
-  } else {
-    return new ThriftTest::Xtruct({string_thing => $arg1});
+  if ($arg0 eq 'Xception') {
+    die ThriftTest::Xception->new({errorCode => 1001, message => 'This is an Xception'});
+  }
+  elsif ($arg0 eq 'Xception2') {
+    my $struct_thing = ThriftTest::Xtruct->new({string_thing => 'This is an Xception2'});
+    die ThriftTest::Xception2->new({errorCode => 2002, struct_thing => $struct_thing});
+  }
+  else {
+    return ThriftTest::Xtruct->new({string_thing => $arg1});
   }
 }
 
-sub testOneway() {
+sub testOneway {
   my $self = shift;
   my $num = shift;
   print("testOneway($num): received\n");
@@ -428,11 +401,11 @@
     return bless($self, $classname);
 }
 
-sub secondtestString() {
+sub secondtestString {
   my $self = shift;
   my $thing = shift;
   print("testString($thing)\n");
-  return "testString(\"" . $thing . "\")";
+  return qq|testString("$thing")|;
 }
 
 1;
diff --git a/tutorial/perl/PerlClient.pl b/tutorial/perl/PerlClient.pl
index 1d59656..7c23289 100644
--- a/tutorial/perl/PerlClient.pl
+++ b/tutorial/perl/PerlClient.pl
@@ -37,10 +37,10 @@
 
 use Data::Dumper;
 
-my $socket    = new Thrift::Socket('localhost',9090);
-my $transport = new Thrift::BufferedTransport($socket,1024,1024);
-my $protocol  = new Thrift::BinaryProtocol($transport);
-my $client    = new tutorial::CalculatorClient($protocol);
+my $socket    = Thrift::Socket->new('localhost',9090);
+my $transport = Thrift::BufferedTransport->new($socket,1024,1024);
+my $protocol  = Thrift::BinaryProtocol->new($transport);
+my $client    = tutorial::CalculatorClient->new($protocol);
 
 
 eval{
@@ -53,7 +53,7 @@
     my $sum = $client->add(1,1);
     print "1+1=$sum\n";
 
-    my $work = new tutorial::Work();
+    my $work = tutorial::Work->new();
 
     $work->op(tutorial::Operation::DIVIDE);
     $work->num1(1);
@@ -63,7 +63,7 @@
         $client->calculate(1, $work);
         print "Whoa! We can divide by zero?\n";
     }; if($@) {
-        warn "InvalidOperation: ".Dumper($@);
+        warn 'InvalidOperation: '.Dumper($@);
     }
 
     $work->op(tutorial::Operation::SUBTRACT);
diff --git a/tutorial/perl/PerlServer.pl b/tutorial/perl/PerlServer.pl
index adec978..dfe6b89 100644
--- a/tutorial/perl/PerlServer.pl
+++ b/tutorial/perl/PerlServer.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -67,20 +67,20 @@
   } elsif ($op == tutorial::Operation::DIVIDE) {
     if ($num2 == 0)
     {
-      my $x = new tutorial::InvalidOperation;
+      my $x = tutorial::InvalidOperation->new();
       $x->whatOp($op);
       $x->why('Cannot divide by 0');
       die $x;
     }
     $val = $num1 / $num2;
   } else {
-    my $x = new tutorial::InvalidOperation;
+    my $x = tutorial::InvalidOperation->new();
     $x->whatOp($op);
     $x->why('Invalid operation');
     die $x;
   }
 
-  my $log = new shared::SharedStruct;
+  my $log = shared::SharedStruct->new();
   $log->key($logid);
   $log->value(int($val));
   $self->{log}->{$logid} = $log;
@@ -104,10 +104,10 @@
 
 
 eval {
-  my $handler       = new CalculatorHandler;
-  my $processor     = new tutorial::CalculatorProcessor($handler);
-  my $serversocket  = new Thrift::ServerSocket(9090);
-  my $forkingserver = new Thrift::ForkingServer($processor, $serversocket);
+  my $handler       = CalculatorHandler->new();
+  my $processor     = tutorial::CalculatorProcessor->new($handler);
+  my $serversocket  = Thrift::ServerSocket->new(9090);
+  my $forkingserver = Thrift::ForkingServer->new($processor, $serversocket);
   print "Starting the server...\n";
   $forkingserver->serve();
   print "done.\n";
