|Don't ask to ask, just ask|
Exporting functions into main namespace for the benefit of other use'd modulesby tunaboy (Curate)
|on Jul 10, 2003 at 19:36 UTC||Need Help??|
tunaboy has asked for the wisdom of the Perl Monks concerning the following question:
First off, I am not sure of the title so anyone who has a better title feel free to edit it.
I am creating a wxPerl application and there are several utility functions that I need in almost every other module used by the application.
What I have ended up doing is exporting these utility functions into the main namespace, which allows me to write (for example)
in any module that needs it (which as I said is pretty much every module). This way I can avoid having to explicitely import the util functions in each and every module.
This works, but my question to my fellow monks is would any of you find this confusing to maintain? Or would you consider it a bad idea in general?
Thanks for any input/criticism/tomatoes that you can lob my way.