in reply to Re^3: Use module only if it is in use
in thread Use a module only if it is in use
I don't want to load helper modules that potentially won't be used.
For example, I have to use unidecode() from Text::Unidecode in the module only if the calling program also uses it. Using that method always have a penalty in performance if data is ASCII only.
You are right if you think that a parameter or something like that should be used, but I want to keep things simple and don't want to force an installation of a non-core module that won't be used.
BTW, I tried some other things like loading the external module from my own only if a parameter is being set in new() (yes, runtime!), but the code become dirty.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Use module only if it is in use
by ikegami (Patriarch) on Sep 02, 2009 at 16:13 UTC | |
by ikegami (Patriarch) on Sep 02, 2009 at 16:23 UTC | |
by vitoco (Hermit) on Sep 02, 2009 at 16:33 UTC | |
by ikegami (Patriarch) on Sep 02, 2009 at 16:45 UTC |
In Section
Seekers of Perl Wisdom