X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=cfb4e6d12e9c37a3849defd964a4abbcacc4ede9;hb=2b1798e04c7e7da24eb968124d86c1009bfe19d9;hp=9c341ac75c8d01642bec9de93d712f4847e45be6;hpb=27826cd1080d392a6987bb740a6b626008ac090a;p=p5sagit%2Fstrictures.git diff --git a/Makefile.PL b/Makefile.PL index 9c341ac..cfb4e6d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -9,8 +9,21 @@ my %extra_prereqs = ( multidimensional => 0, 'bareword::filehandles' => 0, ); + +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 $have_compiler - = eval { require ExtUtils::CBuilder; 1 } + = ! parse_args()->{PUREPERL_ONLY} + && eval { require ExtUtils::CBuilder; 1 } && ExtUtils::CBuilder->new->have_compiler; WriteMakefile(