|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re^3: How to import names from a dynamically required moduleby tobyink (Prior) |
| on Oct 03, 2012 at 06:35 UTC ( #996990=note: print w/ replies, xml ) | Need Help?? |
|
This is not specific to import; it works with all class method calls...
In fact, string quoting class names is arguably a much better idea than the more conventional Math::BigInt->new(9), because the latter will start behaving surprisingly if there's ever a BigInt sub defined in the Math package.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||