|Do you know where your variables are?|
Configure global default variables in package at install timeby zachhh (Initiate)
|on May 21, 2013 at 13:30 UTC||Need Help??|
zachhh has asked for the
wisdom of the Perl Monks concerning the following question:
This is entirely out of laziness -- I don't want to have to provide this information in every script using the module. The defaults are hardcoded to be suitable for the server on which it was built. I want to be able to specify these when I install it.
This would necessarily have to change the variable initializations in the .pm file (which seems dangerous -- but hey, make test will tell them something's wrong if they mess it up). Of course, this could also come from a configuration file or the like. But, that seems dirty too.
Is this approach unwise?
If this is a reasonable approach, what are the recommendations? Should this be done in Makefile.PL somehow? Should there be a conf file that is provided and ask the user to modify that if they want changes? How should that be incorporated?