]> git.vpit.fr Git - perl/modules/re-engine-Hooks.git/blobdiff - Makefile.PL
Remove the 5.13 development branch
[perl/modules/re-engine-Hooks.git] / Makefile.PL
index 315aa133594dbffa2fa670c340b8204fb6ef9c5e..5f8a9fddd9e31c913af348ac5e4db60c882d0727 100644 (file)
@@ -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,13 +33,7 @@ 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 => {
@@ -40,6 +44,26 @@ my %META = (
  },
 );
 
+my $latest_dev_rev = 19;
+
+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,6 +119,7 @@ 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,