X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=4fb004059d67c290e859997f10dea0f9f187ee76;hb=8f98ed261eac95dc093a9b6d22c462c790e63736;hp=a54311cd0b4e62e83dfac7a38714d9fabcc09af5;hpb=08f7a8dbc5e48fcece4396a500d37bb2c6e45b74;p=gitmo%2FMouse.git diff --git a/Makefile.PL b/Makefile.PL index a54311c..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"); } @@ -44,8 +48,6 @@ sub create_moose_compatibility_test { # some test does not pass... currently skip it. my %SKIP_TEST = ( '016-trigger.t' => "trigger's argument is incompatble :(", -# '020-load-class.t' => "&Moose::is_class_loaded doesn't exists", - '019-handles.t' => 'incompatible', '029-new.t' => 'Class->new(undef) incompatible', '010-isa-or.t' => 'Mouse has a [BUG]', '044-attribute-metaclass.t' => 'Moose::Meta::Attribute does not have a "create"',