From: Graham Knop Date: Wed, 14 Feb 2018 15:24:45 +0000 (+0100) Subject: Module::Install -> Distar X-Git-Tag: v1.001_001~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6ea99b113f2d5d3c7672a0eb16462aa1579f27f5;p=p5sagit%2FClass-C3-Componentised.git Module::Install -> Distar --- diff --git a/.gitignore b/.gitignore index 7580005..eac1804 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,19 @@ -Build -Build.bat -MANIFEST -MANIFEST.bak -META.* -MYMETA.* -Makefile -Makefile.old -README -_build/ -blib/ -inc/ -pm_to_blib -.*.sw? +/MANIFEST +/MANIFEST.bak +/MYMETA.* +/Makefile +/Makefile.old +/README +/blib/ +/pm_to_blib +/Distar +*~ +*# +.#* +/Class-C3-Componentised-*/ +/Class-C3-Componentised-*.tar.gz +/cover_db/ +/_eumm/ + +# yes that's right, distar makes it for us +/MANIFEST.SKIP diff --git a/Makefile.PL b/Makefile.PL index 338ce6b..cbfc440 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,36 +1,96 @@ -use inc::Module::Install 1.00; - +use strict; +use warnings FATAL => 'all'; use 5.006002; -perl_version '5.006002'; - -name 'Class-C3-Componentised'; -author 'Ash Berlin '; -all_from 'lib/Class/C3/Componentised.pm'; -test_requires 'Test::Exception' => '0.31'; -test_requires 'Test::More' => '0.96'; +my %META = ( + name => 'Class-C3-Componentised', + license => 'perl_5', + prereqs => { + configure => { requires => { + 'ExtUtils::MakeMaker' => 0, + } }, + build => { requires => { + } }, + test => { + requires => { + 'Test::Exception' => '0.31', + 'Test::More' => '0.96', + }, + }, + runtime => { + requires => { + 'perl' => '5.006002', + 'MRO::Compat' => '0.09', + 'Class::Inspector' => '1.23', + # we don't actually need Class::C3. MRO::Compat loads it on 5.8. On 5.10 + # it isn't needed. However, some existing code relies on us loading + # Class::C3. We don't want to break it just yet. Therefore we depend + # directly on Class::C3 as well. + 'Class::C3' => '0.20', + }, + }, + }, + resources => { + repository => { + url => 'git://git.shadowcat.co.uk/p5sagit/Class-C3-Componentised.git', + web => 'https://github.com/p5sagit/Class-C3-Componentised', + type => 'git', + }, + bugtracker => { + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Class-C3-Componentised', + mailto => 'bug-Class-C3-Componentised@rt.cpan.org', + }, + license => [ 'http://dev.perl.org/licenses/' ], + }, + no_index => { + directory => [ 't', 'xt' ] + }, +); -requires 'MRO::Compat' => '0.09'; -requires 'Class::Inspector' => '1.23'; +my %MM_ARGS = (); -# we don't actually need Class::C3. MRO::Compat loads it on 5.8. On 5.10 it -# isn't needed. However, some existing code relies on us loading Class::C3. We -# don't want to break it just yet. Therefore we depend directly on Class::C3 as -# well. -requires 'Class::C3' => '0.20'; +## BOILERPLATE ############################################################### +require ExtUtils::MakeMaker; +(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; -resources repository => 'git://git.shadowcat.co.uk/p5sagit/Class-C3-Componentised.git'; +# have to do this since old EUMM dev releases miss the eval $VERSION line +my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; +my $mymeta = $eumm_version >= 6.57_02; +my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; -if ($Module::Install::AUTHOR) { +($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; +($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; +$META{license} = [ $META{license} ] + if $META{license} && !ref $META{license}; +$MM_ARGS{LICENSE} = $META{license}[0] + if $META{license} && $eumm_version >= 6.30; +$MM_ARGS{NO_MYMETA} = 1 + if $mymeta_broken; +$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } + unless -f 'META.yml'; +$MM_ARGS{PL_FILES} ||= {}; +$MM_ARGS{NORECURS} = 1 + if not exists $MM_ARGS{NORECURS}; - print "Regenerating README\n"; - system('pod2text lib/Class/C3/Componentised.pm > README'); - - if (-f 'MANIFEST') { - print "Removing MANIFEST\n"; - unlink 'MANIFEST'; - } +for (qw(configure build test runtime)) { + my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; + my $r = $MM_ARGS{$key} = { + %{$META{prereqs}{$_}{requires} || {}}, + %{delete $MM_ARGS{$key} || {}}, + }; + defined $r->{$_} or delete $r->{$_} for keys %$r; } +$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; + +delete $MM_ARGS{MIN_PERL_VERSION} + if $eumm_version < 6.47_01; +$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} + if $eumm_version < 6.63_03; +$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} + if $eumm_version < 6.55_01; +delete $MM_ARGS{CONFIGURE_REQUIRES} + if $eumm_version < 6.51_03; -WriteAll; +ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); +## END BOILERPLATE ########################################################### diff --git a/lib/Class/C3/Componentised.pm b/lib/Class/C3/Componentised.pm index 13173cb..3a241ed 100644 --- a/lib/Class/C3/Componentised.pm +++ b/lib/Class/C3/Componentised.pm @@ -2,11 +2,7 @@ package Class::C3::Componentised; =head1 NAME -Class::C3::Componentised - -=head1 DESCRIPTION - -Load mix-ins or components to your C3-based class. +Class::C3::Componentised - Load mix-ins or components to your C3-based class =head1 SYNOPSIS diff --git a/maint/Makefile.PL.include b/maint/Makefile.PL.include new file mode 100644 index 0000000..d6d7ea2 --- /dev/null +++ b/maint/Makefile.PL.include @@ -0,0 +1,9 @@ +BEGIN { -e 'Distar' or system("git clone git://git.shadowcat.co.uk/p5sagit/Distar.git") } +use lib 'Distar/lib'; +use Distar 0.001; + +use ExtUtils::MakeMaker 6.57_10 (); + +author 'Ash Berlin '; + +1;