X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=Makefile.PL;h=d5e76ab93d7c2f622fecda6e92f0e929ce641570;hb=022b9e6b3f519f7e4041112b407b6769dedd7799;hp=c623c120c65fdcb1ae489f80bdc3fc5ed3b82132;hpb=13c3c3ffef691cfc461e88ac9a9e6cef65a15a8f;p=maypole.git diff --git a/Makefile.PL b/Makefile.PL index c623c12..d5e76ab 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -21,6 +21,7 @@ WriteMakefile( UNIVERSAL::require => 0, URI::QueryParam => 0, CGI::Simple => 0, + HTTP::Headers => 1.59, Template => 0, Template::Plugin::Class => 0, Test::MockModule => 0, @@ -45,11 +46,14 @@ sub has_module { if ( !-e "t/beerdb.db" ) { print "Making SQLite DB\n"; - eval { require DBD::SQLite }; - die "No, wait, we don't have SQLite installed. Never mind\n" if $@; + my $driver = 'SQLite'; + eval { require DBD::SQLite } or do { + print "Error loading DBD::SQLite, trying DBD::SQLite2\n"; + eval {require DBD::SQLite2} ? $driver = 'SQLite2' + : die "DBD::SQLite2 is not installed"; + }; require DBI; - my $dbh = DBI->connect("dbi:SQLite:dbname=t/beerdb.db"); - + my $dbh = DBI->connect("dbi:$driver:dbname=t/beerdb.db"); my $sql = join( '', () ); for my $statement ( split /;/, $sql ) {