• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/H04-Feb-2021-

t/H04-Feb-2021-

tools/H04-Feb-2021-

MANIFEST.SKIPH A D04-Feb-2021182

Makefile.PLH A D04-Feb-20211.8 KiB

Makefile.amH A D04-Feb-20213 KiB

Makefile.inH A D04-Feb-202126 KiB

README.mdH A D04-Feb-20214.3 KiB

build-cpan-dist.shH A D04-Feb-20211.3 KiB

coding_standards.mdH A D04-Feb-2021170

test.plH A D04-Feb-2021850

README.md

1Thrift Perl Software Library
2
3# Summary
4
5Apache Thrift is a software framework for scalable cross-language services development.
6It combines a software stack with a code generation engine to build services that work
7efficiently and seamlessly between many programming languages.  A language-neutral IDL
8is used to generate functioning client libraries and server-side handling frameworks.
9
10# License
11
12Licensed to the Apache Software Foundation (ASF) under one
13or more contributor license agreements. See the NOTICE file
14distributed with this work for additional information
15regarding copyright ownership. The ASF licenses this file
16to you under the Apache License, Version 2.0 (the
17"License"); you may not use this file except in compliance
18with the License. You may obtain a copy of the License at
19
20  http://www.apache.org/licenses/LICENSE-2.0
21
22Unless required by applicable law or agreed to in writing,
23software distributed under the License is distributed on an
24"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
25KIND, either express or implied. See the License for the
26specific language governing permissions and limitations
27under the License.
28
29# For More Information
30
31See the [Apache Thrift Web Site](http://thrift.apache.org/) for more information.
32
33# Using Thrift with Perl
34
35Thrift requires Perl >= 5.10.0
36
37Unexpected exceptions in a service handler are converted to
38TApplicationException with type INTERNAL ERROR and the string
39of the exception is delivered as the message.
40
41On the client side, exceptions are thrown with die, so be sure
42to wrap eval{} statments around any code that contains exceptions.
43
44Please see tutoral and test dirs for examples.
45
46The Perl ForkingServer ignores SIGCHLD allowing the forks to be
47reaped by the operating system naturally when they exit.  This means
48one cannot use a custom SIGCHLD handler in the consuming perl
49implementation that calls serve().  It is acceptable to use
50a custom SIGCHLD handler within a thrift handler implementation
51as the ForkingServer resets the forked child process to use
52default signal handling.
53
54# Dependencies
55
56The following modules are not provided by Perl 5.10.0 but are required
57to use Thrift.
58
59## Runtime
60
61  * Bit::Vector
62  * Class::Accessor
63
64## Test
65
66This is only required when running tests:
67
68  * Test::Exception
69
70### HttpClient Transport
71
72These are only required if using Thrift::HttpClient:
73
74  * HTTP::Request
75  * IO::String
76  * LWP::UserAgent
77
78### SSL/TLS
79
80These are only required if using Thrift::SSLSocket or Thrift::SSLServerSocket:
81
82  * IO::Socket::SSL
83
84# Breaking Changes
85
86## 0.10.0
87
88The socket classes were refactored in 0.10.0 so that there is one package per
89file.  This means `use Socket;` no longer defines SSLSocket.  You can use this
90technique to make your application run against 0.10.0 as well as earlier versions:
91
92`eval { require Thrift::SSLSocket; } or do { require Thrift::Socket; }`
93
94## 0.11.0
95
96  * Namespaces of packages that were not scoped within Thrift have been fixed.
97  ** TApplicationException is now Thrift::TApplicationException
98  ** TException is now Thrift::TException
99  ** TMessageType is now Thrift::TMessageType
100  ** TProtocolException is now Thrift::TProtocolException
101  ** TProtocolFactory is now Thrift::TProtocolFactory
102  ** TTransportException is now Thrift::TTransportException
103  ** TType is now Thrift::TType
104
105If you need a single version of your code to work with both older and newer thrift
106namespace changes, you can make the new, correct namespaces behave like the old ones
107in your files with this technique to create an alias, which will allow you code to
108run against either version of the perl runtime for thrift:
109
110`BEGIN {*TType:: = *Thrift::TType::}`
111
112  * Packages found in Thrift.pm were moved into the Thrift/ directory in separate files:
113  ** Thrift::TApplicationException is now in Thrift/Exception.pm
114  ** Thrift::TException is now in Thrift/Exception.pm
115  ** Thrift::TMessageType is now in Thrift/MessageType.pm
116  ** Thrift::TType is now in Thrift/Type.pm
117
118If you need to modify your code to work against both older or newer thrift versions,
119you can deal with these changes in a backwards compatible way in your projects using eval:
120
121`eval  { require Thrift::Exception; require Thrift::MessageType; require Thrift::Type; }
122 or do { require Thrift; }`
123
124# Deprecations
125
126## 0.11.0
127
128Thrift::HttpClient setRecvTimeout() and setSendTimeout() are deprecated.
129Use setTimeout instead.
130
131