In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/0338a13cb079549e909a87da11794f34c6f708e5?hp=43cd5cb7e818c8635f51ef56a15b50d3dadbc735>

- Log -----------------------------------------------------------------
commit 0338a13cb079549e909a87da11794f34c6f708e5
Author: Chris 'BinGOs' Williams <[email protected]>
Date:   Thu Jul 26 15:58:02 2012 +0100

    Make Module::CoreList install into 'site' >= 5.012
    
    Also if versiononly is set make sure that corelist is installed
    with the appropriate versioned suffix.
-----------------------------------------------------------------------

Summary of changes:
 dist/Module-CoreList/Makefile.PL |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/dist/Module-CoreList/Makefile.PL b/dist/Module-CoreList/Makefile.PL
index fd55b68..3fd5f61 100644
--- a/dist/Module-CoreList/Makefile.PL
+++ b/dist/Module-CoreList/Makefile.PL
@@ -1,6 +1,7 @@
 use ExtUtils::MakeMaker;
 
-push @extra, 'INSTALLDIRS' => 'perl' if $] >= 5.008009;
+push @extra, 'INSTALLDIRS' => 'perl' if $] >= 5.008009 and $] < 5.012;
+
 
 WriteMakefile
 (
@@ -10,9 +11,24 @@ WriteMakefile
     'PREREQ_PM' => {
        'Test::More' => '0',
     },
-    'EXE_FILES' => [ 'corelist' ],
+    'EXE_FILES' => [ _scripts() ],
     'PL_FILES' => {},
     LICENSE => 'perl',
     @extra,
 )
 ;
+
+sub _scripts {
+ my $scripts = 'corelist';
+ if ( $] >= 5.008009 and !$ENV{PERL_CORE} ) {
+   require Config;
+   my $version = sprintf("%vd",$^V);
+   if ( $Config::Config{versiononly} and
+      $Config::Config{startperl} =~ /\Q$version\E$/ ) {
+      require File::Copy;
+      File::Copy::copy( 'corelist', "corelist$version" );
+      $scripts = "corelist$version";
+    }
+ }
+ return $scripts;
+}

--
Perl5 Master Repository

Reply via email to