Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2015-07-07 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (91 votes), past polls