in reply to Re^2: use depending on environment
in thread use depending on environment

Just a couple of things. According to the docs for use:

[use] is exactly equivalent to
BEGIN { require Module; import Module LIST; }
except that Module must be a bareword.
In other words, at least according to the docs, if one wants to replicate at runtime what use does, it should be Foo->import, not Foo::import.

The second point is only a clarification of a potentially misleading detail. The routine Bar::old in your example can be called even if Bar::new has not been called first. In other words, it is not the case that executing Bar::new somehow defines Bar::old. (I'm not saying that you wrote or believe this, but someone reading your post may incorrectly draw this conclusion.)

the lowliest monk

Replies are listed 'Best First'.