I made a very simple example which I will attach, however in a nutshell if I define a structure in one thrift file like this:
Then I define a service in another namespace like this:
Then I compile both of them, the resulting generated perl code in gen-perl/org/real/Company.pm has the following use clauses in it:
Later on in the file we have:
If you put a simple wrapper around this call, the client gets an exception:
Line 98 is where org::fiction::rpc::ForeignInfo is mentioned. Without a use clause for the Types defined by the include it cannot be used.
If I add this line to the generated code in Company.pm:
Then everything works.