I was told ... perl doesn't support using in-memory versions of modules.
You have been told repeatedly in this thread that the semantics of the order of operations of bareword checking and importing have been long established and documented and tested and unchanged for years. You have been given several suggestions as to how to fix your problem.
Download any of several dozen of releases of Perl and try the various examples multiple people have given you in this thread. It's easy. It's empiricism.
You seem to think perl doesn't change...
I'm not interested in helping you if you're going to put strawmen arguments in my mouth.