in reply to Re^2: Building a CPAN module with User Inputs
in thread Building a CPAN module with User Inputs

The situation Damian describes as an example is somewhat different than your use appears to be. In the case Damian describes the information is required to tailor an installation including dependencies at install time. In your use case that does not seem to be the requirement. That is to say, the installed materials (except possibly some configuration constants) are not affected by the information that would be provided by the user at install time.

It is better to avoid interrupting the install processing with required UI because that breaks automatic install processes. Where that requirement is known up front it's not so much of an issue, but if some module in the future requires your module to be installed the UI requirement could become rather troublesome. There's a lot of hand waving going on there of course and it could well be that the ifs and buts are not relevant or are a cost that you and users of your module are happy to accept.

The ultimate answer is that your module is (conventionally) installed using makefile.pl to build a makefile that then is used to install and test your module. Guess what, the makefile.pl is a Perl script! You can edit it to do whatever you need. In the simplest case you could prompt for the required information then write that to a configuration file that is installed with the module.


Perl reduces RSI - it saves typing
  • Comment on Re^3: Building a CPAN module with User Inputs

Replies are listed 'Best First'.
Re^4: Building a CPAN module with User Inputs
by bichonfrise74 (Vicar) on Oct 28, 2008 at 15:45 UTC
    Thanks for all the inputs, monks.