Skip to content

Instantly share code, notes, and snippets.

@melo
Created May 10, 2015 06:58
Show Gist options
  • Save melo/b00c380bad52bfe8c1ed to your computer and use it in GitHub Desktop.
Save melo/b00c380bad52bfe8c1ed to your computer and use it in GitHub Desktop.
sub _merge_cpanfile {
my @cpanfiles = map { $_ = Module::CPANfile->load($_)->prereqs } _find_cpanfiles($_[0]);
my $reqs = CPAN::Meta::Prereqs->new->with_merged_prereqs(\@cpanfiles);
return Module::CPANfile->from_prereqs($reqs->as_string_hash)->to_string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment