Currently our perl package module files contain multiple packages. We should break each package out to an individual file (or at least make sure everything is in the Thrift namespace) and properly version it. Package versioning was introduced in Perl 5.10 so:
1. Update the minimum required perl to 5.10. This is based on http://search.cpan.org/~jpeacock/version-0.9917/lib/version.pod indicating that perl version object was added to perl in 5.10.
2. For each package use the perl MODULE VERSION perlmod syntax, where VERSION is v0.11.0. This is based on http://perldoc.perl.org/functions/package.html.
3. Each module not under the Thrift namespace must be moved there (TApplicationException, TMessageType, TType). This will be a breaking change, but necessary for proper packaging of the library.
Currently if you inspect the Perl PAUSE version metadata for Thrift's sub-modules only the 0.9.0 modules from gslin have version identities.
For example if you look at Thrift and Thrift::BinaryProtocol in the CPAN list of packages at http://www.cpan.org/modules/02packages.details.txt you will see:
There are some anomalies, for example packages defined in Thrift.pm come out at the top level namespace like:
So technically if you do 'install TApplicationException' I would expect you might get thrift. This is wrong and should be fixed. TApplicationException needs to be inside Thrift, not at the top level.
Also we should pull in relevant changes from the patch in
THRIFT-4059 around improving packaging.
Also we should actually use TProtocolException and TTransportException instead of just TException everywhere.