File Coverage

blib/lib/Thrift/API/HiveClient2/Compat.pm
Criterion Covered Total %
statement 12 18 66.6
branch 1 2 50.0
condition n/a
subroutine 5 5 100.0
pod n/a
total 18 25 72.0


line stmt bran cond sub pod time code
1             package Thrift::API::HiveClient2::Compat;
2             $Thrift::API::HiveClient2::Compat::VERSION = '0.023';
3             {
4             $Thrift::API::HiveClient2::Compat::DIST = 'Thrift-API-HiveClient2';
5             }
6              
7 2     2   12 use strict;
  2         3  
  2         48  
8 2     2   8 use warnings;
  2         2  
  2         44  
9 2     2   38 use 5.010;
  2         6  
10              
11 2     2   10 use Thrift;
  2         4  
  2         179  
12              
13             # Compatibility layer for the changes in the new versions.
14             #
15             # To be removed in the near future to break free from older releases of Thrift.
16              
17             BEGIN {
18 2 50   2   63 if ( ! defined &TType::STOP ) {
19             # >= 0.11.0
20             # Yes, the naming is broken in Thrift:: since forever
21 0           require Thrift::Type;
22 0           require Thrift::MessageType;
23 0           require Thrift::Exception;
24 0           *TType:: = *Thrift::TType::;
25 0           *TMessageType:: = *Thrift::TMessageType::;
26 0           *TApplicationException:: = *Thrift::TApplicationException::;
27             }
28             }
29              
30             # More things to consider
31             # [1]
32             # eval { require Thrift::SSLSocket; } or do { require Thrift::Socket; }
33             # [2]
34             # Thrift::HttpClient setRecvTimeout() and setSendTimeout() are deprecated.
35             # Use setTimeout instead.
36              
37             1;
38              
39             __END__