in reply to global variable in a package

Can you show some code? You seem to be contradicting yourself: "the hash is used only in a function in that package" vs. "the Module which is accessing the hash is different from the module which contains the hash".

You can access a global variable in a different package by prefixing with the package name, e.g. keys %packagename::hash