X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=Makefile.PL;h=345bf6bf8d1926979f4f73b1d84581da02f8192b;hb=f9a6b47b3b916585d710eac141003fb8261d9c3c;hp=1740dd5b42bb762e20a218f68491ed6f7be04925;hpb=5e9b1336d1f20d57953e3e419fa7d68e79723528;p=maypole.git diff --git a/Makefile.PL b/Makefile.PL index 1740dd5..345bf6b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -21,10 +21,10 @@ WriteMakefile( UNIVERSAL::require => 0, URI::QueryParam => 0, CGI::Simple => 0, + HTTP::Headers => 0, Template => 0, Template::Plugin::Class => 0, - Test::MockModule => 0, - Test::MockObject => 0, + Test::MockModule => 0, }, # e.g., Module::Name => 1.1 ( $] >= 5.005 @@ -37,6 +37,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 };