]> git.vpit.fr Git - perl/modules/re-engine-Hooks.git/blobdiff - Makefile.PL
Update VPIT::TestHelpers to 15e8aee3
[perl/modules/re-engine-Hooks.git] / Makefile.PL
index 315aa133594dbffa2fa670c340b8204fb6ef9c5e..932e352075cfeb251b4fe76393597b60c64bbbde 100644 (file)
@@ -1,4 +1,4 @@
-use 5.010001;
+use 5.010_001;
 
 use strict;
 use warnings;
@@ -16,6 +16,16 @@ my %PREREQ_PM = (
  'DynaLoader' => 0,
 );
 
+my %BUILD_REQUIRES = (
+ 'ExtUtils::Depends'   => 0,
+ 'ExtUtils::MakeMaker' => 0,
+ 'File::Spec'          => 0,
+ 'POSIX'               => 0,
+ 'Test::More'          => 0,
+ 'blib'                => 0,
+ %PREREQ_PM,
+);
+
 my %META = (
  configure_requires => {
   'ExtUtils::Depends'   => 0,
@@ -23,23 +33,37 @@ my %META = (
   'File::Spec'          => 0,
  },
  build_requires => {
-  'ExtUtils::Depends'   => 0,
-  'ExtUtils::MakeMaker' => 0,
-  'File::Spec'          => 0,
-  'POSIX'               => 0,
-  'Test::More'          => 0,
-  'blib'                => 0,
-  %PREREQ_PM,
+  %BUILD_REQUIRES,
  },
  dynamic_config => 1,
  resources => {
-  bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
+  bugtracker => "http://rt.cpan.org/Dist/Display.html?Name=$dist",
   homepage   => "http://search.cpan.org/dist/$dist/",
   license    => 'http://dev.perl.org/licenses/',
   repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
  },
 );
 
+my $latest_dev_rev = 23;
+
+sub is_outdated_dev_perl {
+ my ($rev) = "$]" =~ /^5\.([0-9]{2}[13579])/;
+
+ return unless defined $rev;
+
+ return $rev < $latest_dev_rev;
+}
+
+if (is_outdated_dev_perl) {
+ print STDERR <<EOF;
+     This version of perl ($]) is an outdated development release.
+     re::engine::Hooks supports all stable releases since 5.10.1, and
+     development releases after 5.$latest_dev_rev.0 only.
+     Please consider upgrading your perl to a more recent release.
+EOF
+ exit 0;
+}
+
 sub versioned_file {
  my ($file) = @_;
 
@@ -60,10 +84,9 @@ sub versioned_file {
 
 unless (defined versioned_file('regcomp.c')) {
  print STDERR <<EOF;
-     This version of perl ($]) is not supported by this version of
-     re::engine::Hooks. If your perl has been recently released,
-     make sure there isn't a newer version of the module available
-     on the CPAN.
+     This version of perl ($]) is not yet supported by this version of
+     re::engine::Hooks. If your perl has been recently released, make
+     sure there isn't a newer version of the module available on the CPAN.
 EOF
  exit 0;
 }
@@ -96,11 +119,12 @@ WriteMakefile(
  VERSION_FROM     => $file,
  ABSTRACT_FROM    => $file,
  PL_FILES         => {},
+ BUILD_REQUIRES   => \%BUILD_REQUIRES,
  PREREQ_PM        => \%PREREQ_PM,
  MIN_PERL_VERSION => '5.010001',
  META_MERGE       => \%META,
  dist             => {
-  PREOP    => "pod2text $file > \$(DISTVNAME)/README",
+  PREOP    => "pod2text -u $file > \$(DISTVNAME)/README",
   COMPRESS => 'gzip -9f', SUFFIX => 'gz'
  },
  XSPROTOARG       => '-noprototypes',