On Sun, Mar 28, 2010 at 12:57:36AM +0000, Ben Morrow wrote:

> I would say that any time you think 'I need to ask the user a question
> during installation' it is probably a mistake. Set up your main Bugzilla
> distribution so that it runs tests against any available databases (this
> in itself isn't terribly easy, given that you need a DSN to connect to;
> I'm not sure the best way to handle that), and then create a
> Task::Bugzilla::MySQL distribution that depends on both MySQL and
> Bugzilla, and similarly for the other databases.

If the code will run against SQLite, use that (doesn't apply to
Bugzilla);

If Test::Database is available, use that;

otherwise either ask or just go ahead and install without testing, like
Tk does when there's no $DISPLAY set.

Asking the user isn't an absolute no-no, it's just a last resort.

And don't bother asking if AUTOMATED_TESTING is set, as you're unlikely
to get a sensible response to any questions.

-- 
David Cantrell | Nth greatest programmer in the world

    Suffer the little children to come unto me, as
    their buying habits are most easily influenced.
       -- Marketroid Jesus

Reply via email to