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