in reply to sub running on use statement

Please show the code of the full module, not just a function belonging to it. Or, better yet, a cut-down version of the module still exhibiting the behavior you described.