How to parse cpanfile?

yukikimoto

Yuki Kimoto

Posted on December 10, 2022

How to parse cpanfile?

How to parse cpanfile? Module::CPANfile makes it possible.

use Module::CPANfile;

my $file = Module::CPANfile->load("cpanfile");
my $prereqs = $file->prereqs; # CPAN::Meta::Prereqs object

my @features = $file->features; # CPAN::Meta::Feature objects
my $merged_prereqs = $file->prereqs_with(@identifiers); # CPAN::Meta::Prereqs

$file->merge_meta('MYMETA.json');
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
yukikimoto
Yuki Kimoto

Posted on December 10, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

How to parse cpanfile?
perl How to parse cpanfile?

December 10, 2022