strip Module::Install, use Distar
Karen Etheridge [Fri, 12 May 2017 16:55:28 +0000 (18:55 +0200)]
.gitignore [new file with mode: 0644]
Changes
Makefile.PL
maint/Makefile.PL.include [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..ceabadd
--- /dev/null
@@ -0,0 +1,22 @@
+/META.*
+/MYMETA.*
+/Makefile
+/Makefile.old
+/MANIFEST
+/MANIFEST.SKIP
+/MANIFEST.bak
+/blib/
+/pm_to_blib
+/_eumm/
+!/.gitignore
+*.bs
+/xs/*.c
+*.o
+/cover_db/
+*.gc??
+/test-mydeps-*
+/nytprof*
+/Data-Dumper-Concise-*/
+/Data-Dumper-Concise-*.tar.gz
+/Distar*
+
diff --git a/Changes b/Changes
index 41118ab..b81b8ff 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Data-Dumper-Concise
 
+  - convert distribution from Module::Install to Distar; fixes RT#120856
+
 2.022 Mar 21 2014
   - Fix repo metadata
 
index 10c4096..17d8a3d 100644 (file)
-use 5.006;
-use inc::Module::Install 0.91;
 use strict;
 use warnings FATAL => 'all';
+use ExtUtils::MakeMaker;
+(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
 
-resources 'repository' => 'git://git.shadowcat.co.uk/p5sagit/Data-Dumper-Concise';
-resources 'homepage' => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Data-Dumper-Concise.git;a=summary';
+my %WriteMakefileArgs = (
+  NAME => 'Data::Dumper::Concise',
+  VERSION_FROM => 'lib/Data/Dumper/Concise.pm',
 
-all_from 'lib/Data/Dumper/Concise.pm';
+  META_MERGE => {
+    'meta-spec' => { version => 2 },
+    dynamic_config => 0,
+    resources => {
+      # GitHub mirrors from Shadowcat. We list it so we can get pull requests.
+      # The canonical repo is:
+      # r/o: git://git.shadowcat.co.uk/p5sagit/Data-Dumper-Concise.git
+      # r/w: p5sagit@git.shadowcat.co.uk:Data-Dumper-Concise.git
+      # web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Data-Dumper-Concise.git
+      repository => {
+        url => 'https://github.com/p5sagit/Data-Dumper-Concise.git',
+        web => 'https://github.com/p5sagit/Data-Dumper-Concise',
+        type => 'git',
+      },
+      bugtracker => {
+        mailto => 'bug-Data-Dumper-Concise@rt.cpan.org',
+        web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Dumper-Concise',
+      },
+    },
+    x_contributors => [ # manually added, from git shortlog -e -s -n
+      'Arthur Axel \'fREW\' Schmidt <frioux@gmail.com>',
+      'Matt S Trout <matthewt@hercule.scsys.co.uk>',
+      'Karen Etheridge <ether@cpan.org>',
+    ],
+  },
 
-WriteAll;
+  META_ADD => {
+    'meta-spec' => { version => 2 },
+    prereqs => {
+      configure => {
+        requires => {
+          'ExtUtils::MakeMaker' => '0',
+        },
+      },
+      runtime => {
+        requires => {
+          'Exporter' => '0',
+          'Data::Dumper' => '0',
+          'perl' => '5.006',
+        },
+      },
+      test => {
+        requires => {
+          'Test::More' => '0',
+        },
+      },
+    },
+  },
+);
+
+my $eumm_version  = eval $ExtUtils::MakeMaker::VERSION;
+
+for (qw(configure build test runtime)) {
+  my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
+  next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_}
+           or exists $WriteMakefileArgs{$key};
+  my $r = $WriteMakefileArgs{$key} = {
+    %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}},
+    %{delete $WriteMakefileArgs{$key} || {}},
+  };
+  defined $r->{$_} or delete $r->{$_} for keys %$r;
+}
+
+# dynamic prereqs get added here...
+
+$WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0;
+
+die 'attention developer: you need to do a sane meta merge here!'
+  if keys %{$WriteMakefileArgs{BUILD_REQUIRES}};
+
+$WriteMakefileArgs{BUILD_REQUIRES} = {
+    %{$WriteMakefileArgs{BUILD_REQUIRES} || {}},
+    %{delete $WriteMakefileArgs{TEST_REQUIRES}}
+} if $eumm_version < 6.63_03;
+
+$WriteMakefileArgs{PREREQ_PM} = {
+    %{$WriteMakefileArgs{PREREQ_PM}},
+    %{delete $WriteMakefileArgs{BUILD_REQUIRES}}
+} if $eumm_version < 6.55_01;
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+  if $eumm_version < 6.51_03;
+
+delete $WriteMakefileArgs{MIN_PERL_VERSION}
+  if $eumm_version < 6.48;
+
+delete @WriteMakefileArgs{qw(META_ADD META_MERGE)}
+  if $eumm_version < 6.46;
+
+delete $WriteMakefileArgs{LICENSE}
+  if $eumm_version < 6.31;
+
+WriteMakefile(%WriteMakefileArgs);
diff --git a/maint/Makefile.PL.include b/maint/Makefile.PL.include
new file mode 100644 (file)
index 0000000..993a293
--- /dev/null
@@ -0,0 +1,7 @@
+BEGIN { -e 'Distar' or system("git clone git://git.shadowcat.co.uk/p5sagit/Distar.git") }
+use lib 'Distar/lib';
+use Distar;
+
+author 'mst - Matt S. Trout (cpan:MSTROUT) <mst@shadowcat.co.uk>';
+
+1;