Move Module::Pluggable into ext/ as the next version has actions in its
[p5sagit/p5-mst-13.2.git] / lib / Module / Build / Compat.pm
index c64dfc0..d1bc725 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Compat;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.03';
+$VERSION = '0.2808_01';
 
 use File::Spec;
 use IO::File;
@@ -42,6 +42,13 @@ sub create_makefile_pl {
 
   print {$fh} "# Note: this file was auto-generated by ", __PACKAGE__, " version $VERSION\n";
 
+  # Minimum perl version should be specified as "require 5.XXXXXX" in 
+  # Makefile.PL
+  my $requires = $build->requires;
+  if ( my $minimum_perl = $requires->{perl} ) {
+    print {$fh} "require $minimum_perl;\n";
+  }
+
   # If a *bundled* custom subclass is being used, make sure we add its
   # directory to @INC.
   my $subclass_load = '';