in reply to Interactivity in tests - done correctly?

Why ask the user for the login/password, when the user could set $ENV{MyModOPTRUN} to it? I would output '$ENV{MyModOPTRUN} not set, not running interactive tests' as the status message and have the instructions how to enable it in README or INSTALL.

The "export" syntax only works in unixish shells, but somebody who wants to run the interactive tests should know how to do it for the respective OS ;)

Replies are listed 'Best First'.
Re^2: Interactivity in tests - done correctly?
by tirwhan (Abbot) on Jan 22, 2009 at 13:19 UTC

    There is a total of three strings I need from the user, I think this is easier done interactively than having them set three different environments variables. Also, I'd like to give them some information about the nature of the test they will be running. You're right, this can be put into the README or INSTALL files, but nobody reads the damn things ;-).

    somebody who wants to run the interactive tests should know how to do it for the respective OS ;)

    True, and moritz makes an excellent point about it not even being the same on csh. I'll probably just tell them to set the environment variable and provide further assistance in the README file which they can read if they need it. Thanks!


    All dogma is stupid.

      I read the README and INSTALL files :-)

      One of the things that can piss me off to no end is watching cli cpan hang because a) the config on that machine is missing a timeout b) you didn't code one

      I would say code it, but provide a timeout, and let the thing install even if it's missing something.

      Maybe at compile time it could break and tell why.
      If your module becomes a dep for something else, maybe whomever is installing it will already be aware of what's up.

        I would say code it, but provide a timeout, and let the thing install even if it's missing something.

        Oh, absolutely, I think I didn't explain that very well. I don't intend to prompt all users for the information, just want to tell them that an additional test is available and then have them run that test (with prompts) manually if they want. That will mean less people actually run it, but that's better than annoying everybody who attempts to install the module :-).


        All dogma is stupid.