X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=Makefile.PL;h=c623c120c65fdcb1ae489f80bdc3fc5ed3b82132;hb=e72c221ab5ef5973233bbfb2fa710c993f2be87d;hp=1366dc158cb3d7827d7e5f5b0fc1d5d349bb2a7e;hpb=85968ef28d078868c8e2865a3e76f81ddd4ec94c;p=maypole.git diff --git a/Makefile.PL b/Makefile.PL index 1366dc1..c623c12 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -23,6 +23,7 @@ WriteMakefile( CGI::Simple => 0, Template => 0, Template::Plugin::Class => 0, + Test::MockModule => 0, }, # e.g., Module::Name => 1.1 ( $] >= 5.005 @@ -35,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 };