As you can see from the docs below, "use" statements are processed
before regular code. So I doubt putting them in the subroutine will accomplish what you want.
use Module VERSION LIST
use Module VERSION
use Module LIST
use Module
use VERSION
Imports some semantics into the current package from
the named module, generally by aliasing certain
subroutine or variable names into your package. It
is exactly equivalent to
BEGIN { require Module; import Module LIST; }
except that Module must be a bareword.
In
882270 tilly suggested:
The third option I see is to try to debug the thread problems in the original modules. I have no idea how easy or hard that will be. If you're lucky it will be as simple as not using the modules, but instead require them in the thread that you instantiate the objects from.
Have you tried ditching "use" and go with "require" like he suggested? Seems like the next course of action to take.
Elda Taluta; Sarks Sark; Ark Arks