X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=Makefile.PL;h=4fb004059d67c290e859997f10dea0f9f187ee76;hp=244942074373bf6ab6a6debeec69c584f9a8a67f;hb=bf9f3f91626578b969718595345b809278852891;hpb=f6e5adac67578b48faa24c78a44532fa0c0f39ad diff --git a/Makefile.PL b/Makefile.PL index 2449420..4fb0040 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -12,11 +12,15 @@ tests 't/*.t t/*/*.t'; # > Fixed looks_like_number(undef) to return false for perl >= 5.009002 requires 'Scalar::Util' => 1.14; -build_requires 'Test::Exception' => 0.21; -build_requires 'Test::More' => 0.80; +test_requires 'Test::Exception' => 0.21; +test_requires 'Test::More' => 0.80; if ($Module::Install::AUTHOR) { - if (eval "package foo; use Moose; 1;") { + local @INC = ('lib', @INC); + require 'lib/Mouse.pm'; # for moose_version() + my $require_version = Mouse->moose_version; + + if (eval{ require Moose; Moose->VERSION($require_version) }) { if (eval 'use Module::Install::AuthorTests; 1') { create_moose_compatibility_test(); recursive_author_tests('xt'); @@ -24,7 +28,7 @@ if ($Module::Install::AUTHOR) { print "you don't have a M::I::AuthorTests.\n"; } } else { - print "you don't have a moose. skipping moose compatibility test\n"; + print "you don't have Moose $require_version. skipping moose compatibility test\n"; } system("author/generate-mouse-tiny.pl"); }