Commit | Line | Data |
0cf51544 |
1 | #!/usr/bin/perl -w |
2 | |
3 | use strict; |
4 | use warnings; |
5 | use lib "Porting"; |
6 | |
7 | my $file = "META.yml"; |
8 | die "$0: will not override $file, delete it first.\n" if -e $file; |
9 | |
10 | use Maintainers qw(%Modules get_module_files get_module_pat); |
11 | |
12 | my @CPAN = grep { $Modules{$_}{CPAN} } keys %Modules; |
13 | my @files = map { get_module_files($_) } @CPAN; |
14 | my @dirs = grep { -d $_ } map { get_module_pat($_) } @CPAN; |
15 | |
16 | my $files = join '', map { " - $_\n" } sort { lc $a cmp lc $b } @files; |
17 | my $dirs = join '', map { " - $_\n" } sort { lc $a cmp lc $b } @dirs; |
18 | |
19 | open my $fh, ">$file" or die "Can't open $file: $!"; |
20 | |
21 | print $fh <<"EOI"; |
22 | name: perl |
23 | version: $] |
24 | abstract: Practical Extraction and Reporting Language |
25 | author: perl5-porters\@perl.org |
26 | license: perl |
27 | distribution_type: core |
28 | private: |
29 | directory: |
30 | $dirs |
31 | file: |
32 | $files |
33 | EOI |
34 | |
35 | close $fh; |
36 | |