App-cpanm-meta-checker
view release on metacpan or search on metacpan
App::cpanm::meta::checker
"cpanm" installs a few auxiliary files:
$SITELIB/.meta/DISTNAME-DISTVERSION/MYMETA.json
$SITELIB/.meta/DISTNAME-DISTVERSION/install.json
These files describe several things, such as dependencies declared by
upstream, and sniffed extra context.
This tool exists to read those files, and verify that their dependencies
are still holding true, that no new conflicting dependencies have been
installed and are silently sitting there broken.
Also, as "cpanm"'s auxiliary files are really a prototype for what may
eventually become a tool-chain standard, this tool is also a prototype
for a tool-chain standard checker.
INSTALLATION
This is a Perl module distribution. It should be installed with whichever
lib/App/cpanm/meta/checker.pm view on Meta::CPAN
=head1 DESCRIPTION
C<cpanm> installs a few auxiliary files:
$SITELIB/.meta/DISTNAME-DISTVERSION/MYMETA.json
$SITELIB/.meta/DISTNAME-DISTVERSION/install.json
These files describe several things, such as dependencies
declared by upstream, and sniffed extra context.
This tool exists to read those files, and verify that their dependencies
are still holding true, that no new conflicting dependencies have
been installed and are silently sitting there broken.
Also, as C<cpanm>'s auxiliary files are really a prototype
for what may eventually become a tool-chain standard, this tool
is also a prototype for a tool-chain standard checker.
=head1 METHODS
=head2 C<all_search_dirs>
lib/App/cpanm/meta/checker/State.pm view on Meta::CPAN
our $VERSION = '0.001002';
# ABSTRACT: Shared state for a single test run
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
use Moo qw(has);
use Carp qw(croak);
use CPAN::Meta;
use CPAN::Meta::Check qw(verify_dependencies);
use App::cpanm::meta::checker::State::Duplicates;
use Path::Tiny qw(path);
has 'tests' => (
is => ro =>,
lazy => 1,
lib/App/cpanm/meta/checker/State.pm view on Meta::CPAN
sub _cache_cpan_meta {
my ( undef, $path, $state ) = @_;
return $state->{cpan_meta} if defined $state->{cpan_meta};
return ( $state->{cpan_meta} = CPAN::Meta->load_file( path($path)->child('MYMETA.json') ) );
}
sub _cpan_meta_check_phase_type {
my ( $self, %args ) = @_;
my $meta = $self->_cache_cpan_meta( $args{path}, $args{state} );
for my $dep ( verify_dependencies( $meta, $args{phase}, $args{type} ) ) {
$self->_output( $args{label}, ( sprintf '%s: %s', path( $args{path} )->basename, $dep ) );
}
return;
}
( run in 0.356 second using v1.01-cache-2.11-cpan-73692580452 )