use Distar
Karen Etheridge [Tue, 11 Aug 2015 21:09:57 +0000 (14:09 -0700)]
.gitignore
Makefile.PL
maint/Makefile.PL.include [new file with mode: 0644]

index 2af97ff..cd82aa1 100644 (file)
@@ -11,3 +11,4 @@
 !/.gitignore
 /Catalyst-Plugin-Email-*/
 /Catalyst-Plugin-Email-*.tar.gz
+/Distar/
index ff280dc..062303c 100644 (file)
@@ -3,13 +3,12 @@ use warnings;
 
 use ExtUtils::MakeMaker;
 
-my $developer = -f '.gitignore';
-ExtUtils::MakeMaker->VERSION('7.00') if $developer;
+ExtUtils::MakeMaker->VERSION('7.00') unless -f 'META.yml';
+(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
 
 my %WriteMakefileArgs = (
     NAME => 'Catalyst::Plugin::Email',
     VERSION_FROM => 'lib/Catalyst/Plugin/Email.pm',
-    ABSTRACT => 'Send emails with Catalyst',
     AUTHOR => 'Sebastian Riedel <sri@cpan.org>',
     LICENSE => 'perl_5',
     MIN_PERL_VERSION => 5.008,  # catalyst minimum
@@ -46,7 +45,7 @@ my %WriteMakefileArgs = (
 );
 
 die 'need to do a merge with CPAN::Meta::Requirements!!'
-    if $developer && exists $WriteMakefileArgs{BUILD_REQUIRES};
+    if !-f 'META.yml' && exists $WriteMakefileArgs{BUILD_REQUIRES};
 
 if (!eval { ExtUtils::MakeMaker->VERSION('6.6303') }) {
     $WriteMakefileArgs{BUILD_REQUIRES} = $WriteMakefileArgs{TEST_REQUIRES};
@@ -68,7 +67,7 @@ my %mm_req = (
 );
 for (keys %mm_req) {
     unless (eval { ExtUtils::MakeMaker->VERSION($mm_req{$_}) }) {
-        warn "$_ $@" if $developer;
+        warn "$_ $@" if not -f 'Makefile.PL';
         delete $WriteMakefileArgs{$_};
     }
 }
diff --git a/maint/Makefile.PL.include b/maint/Makefile.PL.include
new file mode 100644 (file)
index 0000000..806efe7
--- /dev/null
@@ -0,0 +1,5 @@
+BEGIN { -e 'Distar' or system("git clone git://git.shadowcat.co.uk/p5sagit/Distar.git") }
+use lib 'Distar/lib';
+use Distar;
+
+1;