]> git.decadent.org.uk Git - maypole.git/blobdiff - Makefile.PL
+ Use HTTP::Headers for input/output headers. Add appropriate unit tests.
[maypole.git] / Makefile.PL
index 1740dd5b42bb762e20a218f68491ed6f7be04925..345bf6bf8d1926979f4f73b1d84581da02f8192b 100644 (file)
@@ -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 };