From: Matt S Trout <mst@shadowcat.co.uk>
Date: Fri, 25 Feb 2011 15:43:34 +0000 (+0000)
Subject: Switch to Distar for author side tooling
X-Git-Tag: release_0.009006~5
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=941a6305f15e607de118d0b74c11f67ff1e39d24;p=gitmo%2FMoo.git

Switch to Distar for author side tooling

We're now using Distar, currently available at

git://git.shadowcat.co.uk/p5sagit/Distar.git

to simplify author-side work. If this breaks your head, touch META.yml.
---

diff --git a/Makefile.PL b/Makefile.PL
index 4883b75..e53578d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,10 +4,6 @@ use 5.008003;
 use ExtUtils::MakeMaker;
 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
 
-unless (-e 'META.yml') {
-  warn "MYMETA.yml is going to be completely wrong. Sorry.\n";
-}
-
 my %BUILD_DEPS = (
   'Test::More' => 0.96,
   'Test::Fatal' => 0.003,
diff --git a/maint/Makefile.PL.include b/maint/Makefile.PL.include
index 53e335d..c5c08d9 100644
--- a/maint/Makefile.PL.include
+++ b/maint/Makefile.PL.include
@@ -1,60 +1,5 @@
-use strict;
-use warnings FATAL => 'all';
+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 => 'Matt S Trout <mst@shadowcat.co.uk>',
-      ABSTRACT_FROM => $args{VERSION_FROM},
-    );
-  }
-}
-
-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;
-}
-
-manifest_include(
-  'lib' => '.pm',
-  't' => '.t',
-  't/lib' => '.pm',
-  'xt' => '.t',
-  'xt/lib' => '.pm',
-  '' => qr{([^/]+).PL},
-  '' => qr{Changes|MANIFEST|README|META\.yml},
-  'maint' => qr{[^.].*},
-);
+author 'mst - Matt S. Trout (cpan:MSTROUT) <mst@shadowcat.co.uk>';
 
 1;
diff --git a/maint/Makefile.include b/maint/Makefile.include
deleted file mode 100644
index 0c1e6d5..0000000
--- a/maint/Makefile.include
+++ /dev/null
@@ -1,13 +0,0 @@
-bump:
-	maint/bump-version
-	rm Makefile
-bumpminor:
-	maint/bump-version minor
-	rm Makefile
-bumpmajor:
-	maint/bump-version major
-	rm Makefile
-readme:
-	pod2text lib/Moo.pm >README
-upload: $(DISTVNAME).tar$(SUFFIX)
-	cpan-upload $<