in reply to Re^2: How not to hardcode a package name?
in thread How not to hardcode a package name?
The package of a line of code is set when that line is compiled.mean that it can't be done, or just that an eval is not the way to do it? (If I understand your code snippet correctly, you're saying that I can build up all the code I want in that package into a single string and eval that—but I'm sure that's not Best Practice, to say the least.)Furthermore, package is lexically scoped, so you can't just put the eval in a BEGIN.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How not to hardcode a package name?
by ikegami (Patriarch) on Aug 28, 2008 at 21:01 UTC |