X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=Makefile.PL;h=e6a0c6724796c2ed2defc65266686d2393acdc74;hp=38c8a060f98a44030a946355d972581fd899f947;hb=df6dd016657118a06b408d21767dbc9b4ca476b9;hpb=02cf53bb8ee52cf0f38e939ddd99f574baea20b1 diff --git a/Makefile.PL b/Makefile.PL index 38c8a06..e6a0c67 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -22,6 +22,31 @@ include 'Test::Exception'; # work around 0.27_0x (its use of diehook might be wr recommends 'MRO::Compat' if $] < 5.010; +my $use_xs; + +for (@ARGV) { + /^--pp$/ and $use_xs = 0; + /^--xs$/ and $use_xs = 1; +} + +if(!defined $use_xs){ + configure_requires 'ExtUtils::CBuilder'; + require ExtUtils::CBuilder; + $use_xs = ExtUtils::CBuilder->new(quiet => 1)->have_compiler(); +} + +if($use_xs){ + require Module::Install::XSUtil; + use_ppport(3.19); + cc_warnings(); + cc_src_paths('xs-src'); + + print "Mouse configured in XS (--xs)\n"; +} +else{ + print "Mouse configured in Pure Perl (--pp)\n"; +} + if ($Module::Install::AUTHOR) { local @INC = ('lib', @INC); require 'lib/Mouse/Spec.pm'; @@ -55,7 +80,7 @@ sub create_moose_compatibility_test { # some test does not pass... currently skip it. my %SKIP_TEST = ( '016-trigger.t' => "trigger's argument is incompatble :(", - '010-isa-or.t' => "Mouse has a [BUG]", + '810-isa-or.t' => "Mouse has a [BUG]", '052-undefined-type-in-union.t' => "Mouse accepts undefined type as a member of union types", '054-anon-leak.t' => 'Moose has memory leaks',