]> git.decadent.org.uk Git - maypole.git/commitdiff
Test::MockObject isn't a dependency, add helper for dynamic prereq_pm (which may...
authorSimon Cozens <simon@simon-cozens.org>
Mon, 6 Dec 2004 19:37:34 +0000 (19:37 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Mon, 6 Dec 2004 19:37:34 +0000 (19:37 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@300 48953598-375a-da11-a14b-00016c27c3ee

Makefile.PL
t/apache_mvc.t

index 1740dd5b42bb762e20a218f68491ed6f7be04925..c623c120c65fdcb1ae489f80bdc3fc5ed3b82132 100644 (file)
@@ -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 };
index 4bb718571676329d9de13ba29daff59a54cc1707..e6561289fa74ef370b18ed37e0b5de724d24d00d 100644 (file)
@@ -1,7 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
 use Test::More tests => 10;
-use Test::MockObject;
 
 require_ok('Apache::MVC');
 ok($Apache::MVC::VERSION, 'defines $VERSION');