Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 wandering the Monastery: (12)
As of 2014-09-18 20:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (124 votes), past polls