|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Passing around symbol table aliasesby gnosti (Pilgrim) |
| on Sep 07, 2011 at 02:42 UTC ( #924505=perlquestion: print w/ replies, xml ) | Need Help?? |
|
gnosti has asked for the
wisdom of the Perl Monks concerning the following question:
Estimable Monks,
For brevity in code, I've been using some aliases of the following form in the main namespace of a project: Up to now, I used 'our' to give all packages access to these aliases via the main namespace:
But now, I am refactoring this to use Exporter. I'm looking for a way to create these aliases in each namespace without using boilerplate. I'd like use Globals to accomplish this. I tried some code like this: However, executing use Globals does not appear to provide the package name to caller() in Globals.pm. I hope this explanation is sufficiently intelligible, and would be grateful for any advice you may have.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||