in reply to Calling the correct perl binary
The same thing can happen in-general when you’re deploying Perl scripts to shared-hosting web hosts. You basically wind up with unwanted dependencies upon “the globally-installed Perl,” which results in code that works here but doesn’t work there. Or, a deployed and running website that conks out because of something that you didn’t have anything at all to do with, any notification of, or any control over. (They always seem to make those changes at ungodly hours of the night.)
Indeed, the only way to obtain code that will reliably work when deployed, and that will reliably continue to work wherever deployed, is to make that deployment be completely self-contained.
I would love to know of a tool – and I am quite sure it is well-known (but not yet to me) – that, when pointed to the code in a particular directory, will locate all of the references to external packages that will be resolved by packages “in the environment,” that is to say, “outside of those directories which I designate.” It would likewise be useful if that tool scanned for “shebang” references outside. And it would be really useful if the module that did all of this usefulness was a Test::.
All of which means, no doubt, that surely there is just such a Test:: package... oui?