From: Robert 'phaylon' Sedlacek Date: Thu, 31 May 2012 22:02:46 +0000 (+0000) Subject: added Makefile.PL X-Git-Tag: v0.000001~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FJSON-Diffable.git;a=commitdiff_plain;h=8b5ec61e46c4bcc68ea89a7dd70a256545a8b07b added Makefile.PL --- diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..4736487 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,40 @@ +use strict; +use warnings; + +use ExtUtils::MakeMaker; + +my %build_requires => ( + 'Test::More' => 0.98, +); + +my %requires = ( + 'strictures' => 1, + 'JSON' => 0, +); + +# have to do this since old EUMM dev releases miss the eval $VERSION line +my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 }; +my $mymeta = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5702 }; + +WriteMakefile( + NAME => 'JSON-Diffable', + VERSION_FROM => 'lib/JSON/Diffable.pm', + PREREQ_PM => { + %requires, + ($mymeta_works ? () : (%build_requires)), + }, + ($mymeta_works + ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong + BUILD_REQUIRES => \%build_requires, + META_ADD => { requires => \%requires } + ) + : ( # META_ADD both to get META right - only Makefile written + META_ADD => { + requires => \%requires, + build_requires => \%build_requires, + } + ) + ), + ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()), + LICENSE => 'perl', +);;