in reply to Defining a function in the caller's package
Hi, maybe chromatic's response in the thread How to fool caller() / use NEXT within a dynamic sub might help you. (Update: Hmm, I'm not sure if this works here, because the problem in that thread was the name of the sub, not the package.)
caller always returns the package where the code was, regardless of which name in which package you used to call the code.
By the way, what you are trying to do (creating a sub in the importing package) is basically what Exporter does, however it aliases it to a sub in the imported package.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Defining a function in the caller's package
by rovf (Priest) on Aug 08, 2008 at 11:44 UTC | |
by chromatic (Archbishop) on Aug 08, 2008 at 18:21 UTC |