App::cpanm::meta::checker - Verify and sanity check your installation verses cpanm meta files
version 0.001003
cpanm-meta-checker --all --verbose
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.
my @dirs = $checker->all_search_dirs
See "search_dirs"
my @items = $checker->all_search_dir_child( 'some','path' );
Returns all paths in all search_dirs
that exist with the given name.
search_dirs = [ 'foo', 'bar' ]
all_search_dir_child('baz')
→ foo/baz → exists(Y) → output
→ bar/baz → exists(N) → omitted
my @items = $checker->all_search_dir_children();
Returns all child nodes of all search_dirs
search_dirs = ['foo','bar' ]
all_search_dir_children()
→ (
path( 'foo' )->children,
path( 'bar' )->children,
)
->check_path('./foo/bar/baz');
Read the content from ./foo/bar/baz
and check its consistency.
->check_release('Moose-2.000000')
Read the meta-data for the exact release stated and perform checks on it.
->check_distname('Moose')
Check meta-data for any dist(s)
named Moose
Note: There may be directories residual from past installs.
->check_all
Check meta-data for all installed distributions.
$checker->run_command;
Execute test mode defined by mode
This is the command interface invoked by cpan-meta-checker
that cherry picks options with Getopt
.
my $instance = App::cpanm::meta::checker->new(
%constructor_defaults
);
This creates an instance where %constructor_defaults
are overridden by relevant command line arguments.
-
-s|--sort
- Processdist
directories in alphanumeric order. -
-A|--all
- Check All distributions on the system -
--verbose
- Turn on extra verbosityThis presently just prepends the
list
test to the test list. -
--test foo
- Test only testfoo
May be invoked multiple times to define all tests wanted.
--test check_develop_requires --test check_runtime_suggests
The tests to execute.
Default:
[
'list_empty', 'list_duplicates', 'check_runtime_requires',
'check_runtime_recommends', 'check_runtime_suggests', 'check_runtime_conflicts',
];
Iteration order of .meta
directory.
false
- not sortedtrue
- alphanumerically sorted
Defines execution mode:
all
- Perform tests on all available distributions
list_empty
list_duplicates
check_runtime_requires
check_runtime_recommends
check_runtime_suggests
check_runtime_conflicts
For now, it includes output about every instance where there are more than one set of meta files.
This occurs, because installing a new version of something doesn't purge the data ( or all the files ) of the old one.
This lists all distributions seen.
This lists distributions that have a directory for a meta file, but have no meta file in them. ( Rare )
This lists distributions that have meta files.
There is a check for each combination of:
PHASE: configure build runtime test develop
TYPE: requires recommends suggests conflicts
Each checks the meta-data for conforming dependencies.
For instance:
check_runtime_requires # Report Runtime requirements that are unsatisfied
check_develop_requires # Report Develop requiremetns that are unsatisifed
Kent Fredric [email protected]
This software is copyright (c) 2017 by Kent Fredric [email protected].
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.