http://www.perlmonks.org?node_id=229151


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