From: Karen Etheridge Date: Sun, 5 May 2013 04:52:44 +0000 (-0700) Subject: convert to using Distar X-Git-Tag: v1.000012~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d903922c3a32893cc03aba5a95c9298dc5e150b1;p=p5sagit%2FModule-Metadata.git convert to using Distar --- diff --git a/.gitignore b/.gitignore index 97c8b37..374044c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /MANIFEST.SKIP /MANIFEST /Module-Metadata-* +/Distar diff --git a/Makefile.PL b/Makefile.PL index 8cc8648..a2b9747 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -7,6 +7,8 @@ use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Module::Metadata', VERSION_FROM => 'lib/Module/Metadata.pm', + ABSTRACT_FROM => 'lib/Module/Metadata.pm', + LICENSE => 'perl', PREREQ_PM => { 'Carp' => 0, 'File::Find' => 0, diff --git a/maint/Makefile.PL.include b/maint/Makefile.PL.include index f6d8f11..be3ee28 100644 --- a/maint/Makefile.PL.include +++ b/maint/Makefile.PL.include @@ -1,61 +1,9 @@ -use strict; -use warnings FATAL => 'all'; +BEGIN { -e 'Distar' or system("git clone git://git.shadowcat.co.uk/p5sagit/Distar.git") } +use lib 'Distar/lib'; +use Distar; -{ - package MY; - - { - no warnings 'once'; push @ExtUtils::MakeMaker::Overridable, 'find_tests'; - } - - sub find_tests { - shift->SUPER::find_tests.' xt/*.t'; - } - - sub postamble { 'include maint/Makefile.include' } -} - -{ - no warnings 'redefine'; - sub WriteMakefile { - my %args = @_; - ExtUtils::MakeMaker::WriteMakefile( - %args, - AUTHOR => 'Ken Williams , Randy W. Sims ', - ABSTRACT_FROM => $args{VERSION_FROM}, - LICENSE => 'perl', - ); - } -} - -sub manifest_include { - use autodie; - my @files = @_; - my @parts; - while (my ($dir, $spec) = splice(@files, 0, 2)) { - my $re = ($dir ? $dir.'/' : ''). - ((ref($spec) eq 'Regexp') - ? $spec - : !ref($spec) - ? ".*\Q${spec}\E" - : die "spec must be string or regexp, was: ${spec} (${\ref $spec})"); - push @parts, $re; - } - my $final = '^(?!'.join('|', map "${_}\$", @parts).')'; - open my $skip, '>', 'MANIFEST.SKIP'; - print $skip "${final}\n"; - close $skip; -} +author 'Ken Williams , Randy W. Sims '; manifest_include( - 'lib' => '.pm', - 't' => '.t', - 't/lib' => '.pm', - 'xt' => '.t', - 'xt/lib' => '.pm', - '' => '.PL', - '' => qr{Changes|MANIFEST|README|META\.yml}, - 'maint' => qr{[^.].*}, + 't/smells-of-vcs' => qr{.*}, ); - -1;