NAME

App::ProveDeps - Prove all distributions depending on specified module(s)

VERSION

This document describes version 0.003 of App::ProveDeps (from Perl distribution App-ProveDeps), released on 2020-01-29.

SYNOPSIS

See the included script prove-deps.

FUNCTIONS

prove_deps

Usage:

prove_deps(%args) -> [status, msg, payload, meta]

Prove all distributions depending on specified module(s).

To use this utility, first create ~/.config/prove-deps.conf:

dist_dirs = ~/repos
dist_dirs = ~/repos-other

The above tells prove-deps where to look for Perl distributions. Then:

% prove-deps Log::ger

This will search local CPAN mirror for all distributions that depend on Log::ger then search the distributions in the distribution directories, cd to each and run prove in it.

How distribution directory is searched: first, the exact name (My-Perl-Dist) is searched. If not found, then the name with different case (e.g. my-perl-dist) is searched. If not found, a suffix match (e.g. p5-My-Perl-Dist or cpan-My-Perl-Dist) is searched. If not found, a prefix match (e.g. My-Perl-Dist-perl) is searched. If not found, prove-deps croaks.

This function is not exported.

This function supports dry-run operation.

Arguments ('*' denotes required arguments):

  • dist_dirs* => array[dirname]

    Where to find the distributions.

  • exclude_dist_pattern => re

  • exclude_dists => array[perl::distname]

  • include_dist_pattern => re

  • include_dists => array[perl::distname]

  • modules* => array[perl::modname]

  • phases => array[str]

    Only select dists that depend in these phases.

  • prove_opts => array[str] (default: ["-l"])

  • rels => array[str]

    Only select dists that depend using these relationships.

Special arguments:

  • -dry_run => bool

    Pass -dry_run=>1 to enable simulation mode.

Returns an enveloped result (an array).

First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.

Return value: (any)

TODO

Download distributions.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-ProveDeps.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-ProveDeps.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-ProveDeps

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

prove

App::lcpan

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020, 2017 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.