X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=Makefile.PL;h=c623c120c65fdcb1ae489f80bdc3fc5ed3b82132;hb=13c3c3ffef691cfc461e88ac9a9e6cef65a15a8f;hp=1740dd5b42bb762e20a218f68491ed6f7be04925;hpb=5e9b1336d1f20d57953e3e419fa7d68e79723528;p=maypole.git diff --git a/Makefile.PL b/Makefile.PL index 1740dd5..c623c12 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -23,8 +23,7 @@ WriteMakefile( CGI::Simple => 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 +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 };