X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=b2ddd69b7f791efbba8e4967c965e51d44c92161;hb=350bef653f634d1c7cb7357b45e1835b1489f9b7;hp=b6344e0c89f99028e11b5996032a76df0a8976cb;hpb=3d084a8cc8d18ccfd4e39a64ae21668674ed9c47;p=p5sagit%2FDevel-GlobalDestruction.git diff --git a/Makefile.PL b/Makefile.PL index b6344e0..b2ddd69 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -19,6 +19,18 @@ BEGIN { if ( $^O eq 'cygwin' ) { } }} +use Text::ParseWords; + +sub parse_args { + # copied from EUMM + ExtUtils::MakeMaker::parse_args( + my $tmp = {}, + Text::ParseWords::shellwords($ENV{PERL_MM_OPT} || ''), + @ARGV, + ); + return $tmp->{ARGS} || {}; +} + my $mymeta_works = eval { ExtUtils::MakeMaker->VERSION('6.5707'); 1 }; my $mymeta = $mymeta_works || eval { ExtUtils::MakeMaker->VERSION('6.5702'); 1 }; @@ -26,7 +38,7 @@ my %META_BITS = ( ); my %RUN_DEPS = ( 'Sub::Exporter::Progressive' => '0.001006', - ( (defined ${^GLOBAL_PHASE} or !can_xs() ) + ( (defined ${^GLOBAL_PHASE} or parse_args()->{PUREPERL_ONLY} or !can_xs() ) ? () : ('Devel::GlobalDestruction::XS' => 0) ),