2 # this script must be run by the current perl to get perl's version right
4 # Create a META.yml file in the current directory. Must be run from the
5 # root directory of a perl source tree.
11 use File::Basename qw( dirname );
13 my $file = "META.yml";
14 die "$0: will not override $file, delete it first.\n" if -e $file;
16 use Maintainers qw(%Modules get_module_files get_module_pat);
18 my @CPAN = grep { $Modules{$_}{CPAN} } keys %Modules;
19 my @files = map { get_module_files($_) } @CPAN;
20 my @dirs = grep { -d $_ } map { get_module_pat($_) } @CPAN;
25 my $files = join '', map { " - $_\n" }
28 while(($d = dirname($d)) ne "."){
29 last if exists $dirs{$d};
32 # if $d is "." it means we tried every parent dir of the file and none
33 # of them were in the private list
37 sort { lc $a cmp lc $b } @files;
39 my $dirs = join '', map { " - $_\n" } sort { lc $a cmp lc $b } @dirs;
41 open my $fh, ">$file" or die "Can't open $file: $!";
46 abstract: Practical Extraction and Report Language
47 author: perl5-porters\@perl.org
50 homepage: http://www.perl.org/
51 bugtracker: http://rt.perl.org/perlbug/
52 license: http://dev.perl.org/licenses/
53 distribution_type: core