This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
9f86c61225af7fde9209864cd9a17b22a83e2b5d
[perl5.git] / dist / Module-CoreList / Makefile.PL
1 use ExtUtils::MakeMaker;
2
3 push @extra, 'INSTALLDIRS' => 'perl' if $] >= 5.008009 and $] < 5.012;
4
5
6 WriteMakefile
7 (
8     'NAME' => 'Module::CoreList',
9     'VERSION_FROM' => 'lib/Module/CoreList.pm',
10     'ABSTRACT_FROM' => 'lib/Module/CoreList.pod',
11     'PREREQ_PM' => {
12         'Test::More' => '0',
13         'List::Util' => 0,
14     },
15     'EXE_FILES' => [ _scripts() ],
16     'INSTALLDIRS' => ($] < 5.011 ? 'perl' : 'site'),
17     'PL_FILES' => {},
18     LICENSE => 'perl',
19     @extra,
20 )
21 ;
22
23 sub _scripts {
24  my $scripts = 'corelist';
25  if ( $] >= 5.008009 and !$ENV{PERL_CORE} ) {
26    require Config;
27    my $version = sprintf("%vd",$^V);
28    if ( $Config::Config{versiononly} and
29       $Config::Config{startperl} =~ /\Q$version\E$/ ) {
30       require File::Copy;
31       File::Copy::copy( 'corelist', "corelist$version" );
32       $scripts = "corelist$version";
33     }
34  }
35  return $scripts;
36 }