1# This file was generated by http://search.cpan.org/dist/Dist-Zilla-Plugins-CJM/lib/Dist/Zilla/Plugin/MakeMaker/Custom.pm 2 3use strict; 4use warnings; 5 6# Check if we have a suitable version of the svnlook command. 7eval { 8 my $path = $ENV{PATH} || ''; 9 open my $svnlook, '-|', 'svnlook --version' 10 or die "Aborting because I couldn't find the 'svnlook' executable in PATH='$path'.\n"; 11 $_ = <$svnlook>; 12 if (my ($major, $minor, $patch) = (/(\d+)\.(\d+)\.(\d+)/)) { 13 $major > 1 || $major == 1 && $minor >= 4 14 or die "I need at least version 1.4.0 of svnlook but you have only $major.$minor.$patch.\n"; 15 } else { 16 die "Can't grok Subversion version from svnlook --version command.\n"; 17 } 18 local $/ = undef; # slurp mode 19 <$svnlook>; 20 close $svnlook or die "Can't close svnlook commnand.\n"; 21}; 22if ($@) { 23 warn $@; 24 # CPAN Testers says 25 # (http://wiki.cpantesters.org/wiki/CPANAuthorNotes) that we 26 # should simply exit normally before generating the Makefile if 27 # there is an unmet dependency. 28 exit 0; 29} 30 31use ExtUtils::MakeMaker ; 32 33my %WriteMakefileArgs = ( 34 'ABSTRACT' => 'Caching wrapper around the svnlook command', 35 'AUTHOR' => 'Gustavo L. de M. Chaves <gnustavo@cpan.org>', 36 'CONFIGURE_REQUIRES' => { 37 'ExtUtils::MakeMaker' => '0' 38 }, 39 'DISTNAME' => 'SVN-Look', 40 'LICENSE' => 'perl', 41 'MIN_PERL_VERSION' => '5.008', 42 'NAME' => 'SVN::Look', 43 'PREREQ_PM' => { 44 'Carp' => '0', 45 'File::Spec::Functions' => '0', 46 'File::Temp' => '0', 47 'List::MoreUtils' => '0', 48 'MIME::Base64' => '0', 49 'XML::Simple' => '0', 50 'strict' => '0', 51 'warnings' => '0' 52 }, 53 'TEST_REQUIRES' => { 54 'Cwd' => '0', 55 'File::Copy' => '0', 56 'File::Path' => '0', 57 'Test::More' => '0', 58 'URI::file' => '0', 59 'lib' => '0' 60 }, 61 'VERSION' => '0.42', 62 'test' => { 63 'TESTS' => 't/*.t' 64 }, 65); 66 67unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { 68 my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; 69 my $pp = $WriteMakefileArgs{PREREQ_PM}; 70 for my $mod ( keys %$br ) { 71 if ( exists $pp->{$mod} ) { 72 $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; 73 } 74 else { 75 $pp->{$mod} = $br->{$mod}; 76 } 77 } 78} 79 80delete $WriteMakefileArgs{CONFIGURE_REQUIRES} 81 unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; 82 83WriteMakefile(%WriteMakefileArgs); 84