go ahead... be a heretic | |
PerlMonks |
Re: A Perl Version of Java's importby jhourcle (Prior) |
on Aug 07, 2007 at 13:12 UTC ( [id://631040]=note: print w/replies, xml ) | Need Help?? |
Although I agree that it could be problematic, and might not be 'Best Practices' for many types of code, the general concept could have its uses. I would prefer instead of handling this by moving things into the main namespace, that you instead force a qualification: use aliased 'My::Company::Namespace::*' => 'MCN';Which would then allow you to call the packages in "My::Company::Namespace" with the alternate prefix "MCN::" You could then import/alias multiple namespaces, and just give them different aliases.
In Section
Seekers of Perl Wisdom
|
|