All the Perl that's Practical to Extract and Report

Navigation

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

Whenever a piece of code needs a lot of information to be able to do meaningful work, I like to go for indirection: the module itself does not try to configure itself at installation time, but instead includes a script (eg. process-cpan-install) that takes a bunch of switches with arguments and creates either a configuration file or a script. It will possibly be capable of prompting for missing bits, it might run some checks or set up and initialise the database, etc. Then the user installs the module and after that uses the setup program to, well, set themselves up.

That way you don’t have to play any hairy tricks at installation time and the user can also run several different configurations/installations easily.