App-LintPrereqs

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    prereqs and just use whatever modules are detected by the scanner.)

    Sometimes there are prerequisites that you know are used but can't be
    detected by the scanner, or you want to include anyway. If this is the
    case, you can instruct lint_prereqs to assume that the prerequisite is
    used.

     ;!lint_prereqs assume-used "even though we know it is not currently used"
     Foo::Bar=0
 
     ;!lint_prereqs assume-used "we are forcing a certain version"
     Baz=0.12

    Sometimes there are also prerequisites that are detected by
    scan_prereqs, but are false positives (Perl::PrereqScanner::Lite
    sometimes does this because its parser is simpler) or you know are
    already provided by some other modules. So to make lint-prereqs ignore
    them:

     [Extras / lint-prereqs / assume-provided]
     Qux::Quux=0

    You can also add a "[versions]" section in your "lint-prereqs.conf"
    configuration containing minimum versions that you want for certain
    modules, e.g.:

     [versions]
     Bencher=0.30
     Log::ger=0.19
     ...

    then if there is a prereq specified less than the minimum versions,
    "lint-prereqs" will also complain.

    This function is not exported by default, but exportable.

    Arguments ('*' denotes required arguments):

    *   core_prereqs => *bool* (default: 1)

        Whether or not prereqs to core modules are allowed.

        If set to 0 (the default), will complain if there are prerequisites
        to core modules. If set to 1, prerequisites to core modules are
        required just like other modules.

    *   extra_runtime_dirs => *array[str]*

        Add extra directories to scan for runtime requirements.

    *   extra_test_dirs => *array[str]*

        Add extra directories to scan for test requirements.

    *   fix => *bool*

        Attempt to automatically fix the errors.

        "lint-prereqs" can attempt to automatically fix the errors by
        adding/removing/moving prereqs in "dist.ini". Not all errors can be
        automatically fixed. When modifying "dist.ini", a backup in
        "dist.ini~" will be created.

    *   perl_version => *str*

        Perl version to use (overrides scan_prereqs/dist.ini).

    *   scanner => *str* (default: "regular")

        Which scanner to use.

        "regular" means Perl::PrereqScanner which is PPI-based and is the
        slowest but has the most complete support for Perl syntax.

        "lite" means Perl::PrereqScanner::Lite has uses an XS-based lexer
        and is the fastest but might miss some Perl syntax (i.e. miss some
        prereqs) or crash if given some weird code.

        "nqlite" means Perl::PrereqScanner::NotQuiteLite which is faster
        than "regular" but not as fast as "lite".

    Returns an enveloped result (an array).

    First element ($status_code) is an integer containing HTTP-like status
    code (200 means OK, 4xx caller error, 5xx function error). Second
    element ($reason) is a string containing error message, or something
    like "OK" if status is 200. Third element ($payload) is the actual
    result, but usually not present when enveloped result is an error
    response ($status_code is not 2xx). Fourth element (%result_meta) is
    called result metadata and is optional, a hash that contains extra
    information, much like how HTTP response headers provide additional
    metadata.

    Return value: (any)

HOMEPAGE
    Please visit the project's homepage at
    <https://metacpan.org/release/App-LintPrereqs>.

SOURCE
    Source repository is at
    <https://github.com/perlancar/perl-App-LintPrereqs>.

AUTHOR
    perlancar <perlancar@cpan.org>

CONTRIBUTOR
    Steven Haryanto <stevenharyanto@gmail.com>

CONTRIBUTING
    To contribute, you can send patches by email/via RT, or send pull
    requests on GitHub.

    Most of the time, you don't need to build the distribution yourself. You
    can simply modify the code, then test via:

     % prove -l

    If you want to build the distribution (e.g. to try to install it locally
    on your system), you can install Dist::Zilla,
    Dist::Zilla::PluginBundle::Author::PERLANCAR,



( run in 2.016 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )