q - cpanfile FAQ
=head1 QUESTIONS
=head2 Does cpanfile replace Makefile.PL/Build.PL or META.yml/json?
No, it doesn't. C<cpanfile> is a simpler way to declare CPAN
dependencies, mainly for I<your ap
nfile>, you can certainly I<manage> the dependencies in
C<cpanfile>, then export them into C<META.json> files when shipping to
CPAN, using tools such as L<Dist::Milla> or L<Module::Install::CPANfile>
d_prereqs = $file->prereqs_with(@identifiers); # CPAN::Meta::Prereqs
$file->merge_meta('MYMETA.json');
=head1 DESCRIPTION
Module::CPANfile is a tool to handle L<cpanfile> format to load applicati
META, then feed the prereqs to create Module::CPANfile
my $meta = CPAN::Meta->load_file('MYMETA.json');
my $file = Module::CPANfile->from_prereqs($meta->prereqs);
# load cpanfile, then recreate
META's prereqs and print cpanfile representation of it
my $meta = CPAN::Meta->load_file('MYMETA.json');
my $file = Module::CPANfile->from_prereqs($meta->prereqs);
print $file->to_string;
By def
NOPSIS
requires 'Plack', '1.0'; # 1.0 or newer
requires 'JSON', '>= 2.00, < 2.80';
recommends 'JSON::XS', '2.0';
conflicts 'JSON', '< 1.0';
on 'test' => sub {
requires 'Test::More', '