X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=Makefile.PL;h=c623c120c65fdcb1ae489f80bdc3fc5ed3b82132;hb=271fd90b8a1b9f843853601a75a1334407ff87c4;hp=642dbf63b9ea936187a297a1002feca50b16852e;hpb=435d1e9d0c97ce1e6af8a5396c8e159cf0cf2e8b;p=maypole.git diff --git a/Makefile.PL b/Makefile.PL index 642dbf6..c623c12 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -15,12 +15,15 @@ WriteMakefile( Class::DBI::FromCGI => 0.94, Class::DBI::Loader::Relationship => 0, Class::DBI => 0.96, + Class::DBI::SQLite => 0, CGI::Untaint => 0, UNIVERSAL::moniker => 0, UNIVERSAL::require => 0, + URI::QueryParam => 0, CGI::Simple => 0, Template => 0, Template::Plugin::Class => 0, + Test::MockModule => 0, }, # e.g., Module::Name => 1.1 ( $] >= 5.005 @@ -33,6 +36,13 @@ WriteMakefile( ), ); +sub has_module { + my ($module, $version) = @_; + (my $file = "$module.pm") =~ s/::/\//g; + eval {require $file} or return; + return ($module->VERSION || 0) >= $version; +} + if ( !-e "t/beerdb.db" ) { print "Making SQLite DB\n"; eval { require DBD::SQLite };