- added version/level to the API function table structure
[imager.git] / metafile.pl
CommitLineData
92bda632
TC
1# some versions of EU::MM have problems with recursive Makefile.PLs with
2# this method defined.
3undef &MY::metafile;
4
5sub MY::metafile {
6 my ($self) = @_;
7
8 my $meta = <<YAML;
9--- #YAML:1.0
10name: $self->{NAME}
11version: $self->{VERSION}
12version_from: $self->{VERSION_FROM}
13author: $self->{AUTHOR}
14abstract: $self->{ABSTRACT}
15installdirs: $self->{INSTALLDIRS}
16YAML
17 if (keys %{$Recommends{$self->{NAME}}}) {
18 $meta .= "recommends:\n";
19 while (my ($module, $version) = each %{$Recommends{$self->{NAME}}}) {
20 $meta .= "$module: $version\n";
21 }
22 }
23 $meta .= <<YAML;
24license: perl
25dynamic_config: 1
26distribution_type: module
27generated_by: $self->{NAME} version $self->{VERSION}
28YAML
29 open META, "> meta.tmp" or die "Cannot create meta.tmp: $!";
30 print META $meta;
31 close META;
32
33 return sprintf "metafile :\n\t\$(CP) meta.tmp META.yml\n";
34}
35
361;