in reply to Re: Re: USE or Require?
in thread USE or Require?
Okay, that's a different question and worth more thought.
I don't have a problem importing things into my namespace for three reasons:
- I keep my code fairly short, so I don't have to import many things.
- I tend to import only the things I really want, so the use line explicitly says what I want.
- When I bend my second point, I only do so with well-defined idioms, such as with the Test::* modules or something like File::Path.
I expect someone maintaining my code to be able to find the original location of functions I've imported. I try not to make it hard on that person, but I don't believe in writing un-idiomatic code because it's perceptually "self-documenting". Part of maintainability is readability and duplicate code hurts that.
|
---|
In Section
Meditations