[Bioperl-l] Minor changes to Build.PL for Windows
Sendu Bala
bix at sendu.me.uk
Wed Nov 22 18:30:07 EST 2006
Scott Cain wrote:
> Hello,
>
> I just wanted to mention that I made a few minor changes to Build.PL so
> that I could get `perl Build.PL` to complete successfully. I am using
> ActivePerl 819 and don't have MySQL installed (so DBD::mysql isn't
> present either. The main thing I did was to have the BioDBGFF test
> subroutine quit without asking any questions if Build.PL detected that
> it was running on Windows.
Is it completely impossible for it to pass under Windows? I find that
quite a shame!
I'm surprised it was necessary to make your changes, because it already
had to return true from:
DBI->connect('dbi:mysql:test',undef,undef,{RaiseError=>0,PrintError=>0})
Can Windows pass that test without DBD::mysql installed, and having
passed it why does it then fail the actual BioDBSeqFeature_mysql.t script?
The cleanest way to do your change would be to make some change to the
test_db() sub, eg:
sub test_db {
eval {require DBI;};
if ($^O =~ /mswin/i) {
return "Windows isn't supported";
}
unless
(DBI->connect('dbi:mysql:test',undef,undef,{RaiseError=>0,PrintError=>0})) {
return "Could not connect to test database";
}
return;
}
More information about the Bioperl-l
mailing list