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 );
15 # Get function prototypes
16 require 'regen/regen_lib.pl';
20 my $file = "META.yml";
22 use Maintainers qw(%Modules get_module_files get_module_pat);
24 my @CPAN = grep { $Modules{$_}{CPAN} } keys %Modules;
25 my @files = ('autodoc.pl', 'lib/unicore/mktables', 'TestInit.pm',
26 'Porting/Maintainers.pm', 'Porting/perldelta_template.pod',
27 map { get_module_files($_) } @CPAN);
28 my @dirs = ('cpan', 'win32', grep { -d $_ && $_ !~ /^cpan/ } map { get_module_pat($_) } @CPAN);
33 @files = map { " - $_" }
37 while(($d = dirname($d)) ne "."){
38 last if $d eq $previous_d; # safety valve
39 last if exists $dirs{$d};
43 # if $d is "." it means we tried every parent dir of the file and none
44 # of them were in the private list
46 $d eq "." || $d eq $previous_d;
48 sort { lc $a cmp lc $b } @files;
50 @dirs = map { " - $_" } sort { lc $a cmp lc $b } @dirs;
52 my $fh = open_new($file);
58 abstract: The Perl 5 language interpreter
59 author: perl5-porters\@perl.org
62 homepage: http://www.perl.org/
63 bugtracker: http://rt.perl.org/perlbug/
64 license: http://dev.perl.org/licenses/
65 repository: http://perl5.git.perl.org/
66 distribution_type: core
75 close_and_rename($fh);