Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Namespace Pollution

by vladb (Vicar)
on May 05, 2003 at 19:42 UTC ( #255733=note: print w/ replies, xml ) Need Help??

in reply to Namespace Pollution

Answering your question whether it is right or wrong to import ':all' methods into client code, I think it depends. I like importing all methods for simple modules and in cases where I am absolutely sure no conflicts would arise. Examples of a few such modules are Date::Manip and Data::Dumper.

One way to avoid having to deal with the namespace pollution issue in your code, you might try to make use of an OO interface to your modules. Unfortunately not all have one implemented for them, in which case you might resort to selectively importing only the most often used methods, leaving the rest outside of your namespace ;)


# Under Construction

Comment on Re: Namespace Pollution
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2015-11-27 09:37 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (722 votes), past polls