diff options
Diffstat (limited to 'perl.req-from-meta')
-rwxr-xr-x | perl.req-from-meta | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl.req-from-meta b/perl.req-from-meta index 5b612dd..4f921f6 100755 --- a/perl.req-from-meta +++ b/perl.req-from-meta @@ -18,7 +18,9 @@ my $meta = $path =~ /\.yml$/ : from_json( $data ); # dump the requires with their version -my $requires = $meta->{requires}; +my $requires = $meta->{"meta-spec"}{version} >= 2 + ? $meta->{prereqs}{runtime}{requires} + : $meta->{requires}; foreach my $module ( sort keys %$requires ) { next if $module eq 'perl'; # minimum perl version my $version = $requires->{$module}; |