summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-01-07 18:22:59 -0600
committerJesse Luehrs <doy@tozt.net>2011-01-07 18:22:59 -0600
commit49a8beb1ba8d07be5c2dd6c7e7d793790e665406 (patch)
tree8ae99778eb5a8d2d263ac9191aa0c213953773fb
parente202645fcee801684781f385b01f41d177e25d84 (diff)
downloadextutils-makemaker-dist-zilla-develop-49a8beb1ba8d07be5c2dd6c7e7d793790e665406.tar.gz
extutils-makemaker-dist-zilla-develop-49a8beb1ba8d07be5c2dd6c7e7d793790e665406.zip
initial implementation
-rw-r--r--dist.ini1
-rw-r--r--lib/ExtUtils/MakeMaker/Dist/Zilla.pm64
2 files changed, 65 insertions, 0 deletions
diff --git a/dist.ini b/dist.ini
index b9a1bd8..97e7aa9 100644
--- a/dist.ini
+++ b/dist.ini
@@ -7,3 +7,4 @@ copyright_holder = Jesse Luehrs
dist = ExtUtils-MakeMaker-Dist-Zilla
[Prereqs]
+ExtUtils::MakeMaker = 0
diff --git a/lib/ExtUtils/MakeMaker/Dist/Zilla.pm b/lib/ExtUtils/MakeMaker/Dist/Zilla.pm
index e69de29..25f46cb 100644
--- a/lib/ExtUtils/MakeMaker/Dist/Zilla.pm
+++ b/lib/ExtUtils/MakeMaker/Dist/Zilla.pm
@@ -0,0 +1,64 @@
+package ExtUtils::MakeMaker::Dist::Zilla;
+use strict;
+use warnings;
+
+use ExtUtils::MakeMaker ();
+
+sub import {
+ warn <<'EOF';
+
+ ********************************* WARNING **********************************
+
+ This module uses Dist::Zilla for development. This Makefile.PL will let you
+ run the tests, but you are encouraged to install Dist::Zilla and the needed
+ plugins if you intend on doing any serious hacking.
+
+ ****************************************************************************
+
+EOF
+
+ ExtUtils::MakeMaker->export_to_level(1, @_);
+}
+
+{
+ package MY;
+
+ use Config;
+
+ my $message;
+ BEGIN {
+ $message = <<'MESSAGE';
+
+ ********************************* ERROR ************************************
+
+ This module uses Dist::Zilla for development. This Makefile.PL will let you
+ run the tests, but should not be used for installation or building dists.
+ Building a dist should be done with 'dzil build', installation should be
+ done with 'dzil install', and releasing should be done with 'dzil release'.
+
+ ****************************************************************************
+
+MESSAGE
+ $message =~ s/^(.*)$/\t\$(NOECHO) echo "$1";/mg;
+ }
+
+ sub install {
+ return <<EOF;
+install:
+$message
+ \$(NOECHO) echo "Running dzil install for you...";
+ \$(NOECHO) dzil install
+EOF
+ }
+
+ sub dist_core {
+ return <<EOF;
+dist:
+$message
+ \$(NOECHO) echo "Running dzil build for you...";
+ \$(NOECHO) dzil build
+EOF
+ }
+}
+
+1;