]> granicus.if.org Git - pgbadger/commitdiff
Fix Makefile error, "WriteMakefile: Need even number of args at Makefile.PL" with...
authorDarold Gilles <gilles@darold.net>
Sat, 8 Feb 2014 08:46:20 +0000 (09:46 +0100)
committerDarold Gilles <gilles@darold.net>
Sat, 8 Feb 2014 08:46:20 +0000 (09:46 +0100)
Makefile.PL

index f4330309f3822430fc8ff3d25136c39cb4b28f7a..a5dc4235583d71bdc695f231e2d50548594445e0 100644 (file)
@@ -18,6 +18,22 @@ $ENV{DESTDIR} =~ s/\/$//;
 # Default install path
 my $DESTDIR = $ENV{DESTDIR} || '';
 my $INSTALLDIRS = $ENV{INSTALLDIRS} || 'site';
+my %merge_compat = ();
+
+if ($ExtUtils::MakeMaker::VERSION >= 6.46) {
+       %merge_compat = (
+               'META_MERGE'   => {
+                       resources  => {
+                               homepage => 'http://projects.dalibo.org/pgbadger',
+                               repository  => {
+                                       type => 'git',
+                                       git => 'git@github.com:dalibo/pgbadger.git',
+                                       web => 'https://github.com/dalibo/pgbadger',
+                               },
+                       },
+               }
+       );
+}
 
 WriteMakefile(
        'DISTNAME'      => 'pgbadger',
@@ -34,16 +50,6 @@ WriteMakefile(
        'DESTDIR'      => $DESTDIR,
        'INSTALLDIRS'  => $INSTALLDIRS,
        'clean'        => {},
-       ($ExtUtils::MakeMaker::VERSION < 6.46 ? () : 'META_MERGE'   => {
-               resources  => {
-                       homepage => 'http://projects.dalibo.org/pgbadger',
-                       repository  => {
-                               type => 'git',
-                               git => 'git@github.com:dalibo/pgbadger.git',
-                               web => 'https://github.com/dalibo/pgbadger',
-                       },
-               },
-        }
-       )
+       %merge_compat
 );