Quoth szab...@gmail.com (Gabor Szabo): > > I am trying to create a Makefile.PL using Module::Install for Bugzilla so > it can be uploaded to CPAN. There are many issues I'll have to deal with but > here is one that might be relevant to others. > > Currently Bugzilla can be installed with either MySQL, PostgreSQL or Oracle. > When checking for the prerequisites I'd like to let the user tell > which one she is > going to use and then make sure the relevant database driver is installed. > > How would you do this and how should that be done so automated testers > will also be able to test the package?
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. Ben