Carmel
(
M/MI/MIYAGAWA/Carmel-v0.9.2-TRIAL.tar.gz, MIYAGAWA, 2022;
MetaCPAN
)
package Carmel::Artifact;
use strict;
use CPAN::Meta;
use JSON ();
use Path::Tiny ();
sub new {
my($class, $path) = @_;
bless { path => Path::Tiny->new($path) }, $class;
}
sub path { $_[0]->
self = shift;
my $file = $self->path->child("blib/meta/install.json");
if ($file->exists) {
return JSON::decode_json($file->slurp);
}
die "Can't read build artifact from ", $
f->libs;
}
sub meta {
my $self = shift;
CPAN::Meta->load_file($self->path->child("MYMETA.json"));
}
sub requirements {
my $self = shift;
$self->requirements_for([qw( configure build