in reply to Building a CPAN module with User Inputs

A module that can only be used with one account? Isn't that something you should pass as parameters to the module when you use it? Having the application provide the credentials to the module allow the credentials to be collected using a method appropriate to the application (gui dialog, console input, config file, command line parameter, etc).

  • Comment on Re: Building a CPAN module with User Inputs

Replies are listed 'Best First'.
Re^2: Building a CPAN module with User Inputs
by JavaFan (Canon) on Oct 28, 2008 at 08:16 UTC
    Well, he didn't say the module was only to be used with one account. There's nothing wrong (in fact, it's something I think that should be done) with modules (and programs) having defaults. I really detest programs that refuse to run before you first write a configuration file.

      I really detest programs that refuse to run before you first write a configuration file.

      But you're ok with doing it when installing a module? The exact same prompt you'd get from the module can be given by the program.

        So, if module X needs a configuration file, any program that uses X should have build in a dialog with the user to build the configuration file? Of course, that would require the program to run with priviledges to install system wide defaults - a priviledge which usually is there by the time 'make install' is run.

        Installing system wide defaults make sense to do at install time, not at first run time.