Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: A Perl Version of Java's import

by jhourcle (Prior)
on Aug 07, 2007 at 13:12 UTC ( [id://631040]=note: print w/replies, xml ) Need Help??


in reply to A Perl Version of Java's import

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://631040]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found