Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^6: A simple import() for those special moments

by Aristotle (Chancellor)
on Jan 22, 2003 at 22:45 UTC ( #229151=note: print w/replies, xml ) Need Help??


in reply to Re: Re^4: A simple import() for those special moments
in thread A simple import() for those special moments

It sure was meant as a quick hack. What it was not meant to be though, was something you have to take into consideration at two levels down the code - not inside the module that makes use of this importer, but inside a package that uses a module that makes use of this importer. That falls under action at a distance and is IMO to be avoided at all cost. The fact that warnings will be thrown in case of collisions is not as important as the fact that working around the approach's caveats is very difficult. Esp considering that it puts the burden on someone who shouldn't have to think about it in the first place: the module's user, rather than the module's author. My conclusion remains that I'm not going to use this particular idiom, not even for throw-away code.

Makeshifts last the longest.

  • Comment on Re^6: A simple import() for those special moments

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://229151]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2018-08-14 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (155 votes). Check out past polls.

    Notices?