my($self, $dist) = @_;
my @meta;
my $finder = sub {
if (m!\b$dist-.*[\\/]MYMETA.json!) {
my $meta = CPAN::Meta->load_file($_);
push @meta, $meta if $meta->nam
heck> will warn you about this:
$ carton check
Following dependencies are not satisfied.
JSON has version 2.51. Needs 2.52
Run `carton install` to install them.
You can run C<carton instal
;
use strict;
use warnings;
sub load_json {
my $file = shift;
open my $fh, "<", $file or die "$file: $!";
from_json(join '', <$fh>);
}
sub dump_json {
my($data, $file) = @_;
op
h;
print $fh to_json($data);
}
sub from_json {
require JSON::PP;
JSON::PP->new->utf8->decode($_[0])
}
sub to_json {
my($data) = @_;
require JSON::PP;
JSON::PP->new->utf8->pre
talls;
my $wanted = sub {
if ($_ eq 'install.json') {
push @installs, [ $File::Find::name, "$File::Find::dir/MYMETA.json" ];
}
};
File::Find::find($wanted, $lib
eturn 1;
}
};
for my $file (@installs) {
my $module = Carton::Util::load_json($file->[0]);
my $prereqs = -f $file->[1] ? CPAN::Meta->load_file($file->[1])->effective_p