NAME

CPAN::Changes::Cwalitee::Core - A collection of core indicators for CPAN Changes cwalitee

VERSION

This document describes version 0.009 of CPAN::Changes::Cwalitee::Core (from Perl distribution CPAN-Changes-Cwalitee), released on 2019-08-02.

FUNCTIONS

indicator_date_correct_format

Usage:

 indicator_date_correct_format() -> [status, msg, payload, meta]

Dates are specified in the correct specified format, e.g. YYYY-MM-DD.

Although CPAN::Changes can parse various forms of dates, the spec states that dates should be in the format specified by http://www.w3.org/TR/NOTE-datetime, which is one of:

 YYYY
 YYYY-MM
 YYYY-MM-DD
 YYYY-MM-DD"T"hh:mm<TZD>
 YYYY-MM-DD"T"hh:mm:ss<TZD>
 YYYY-MM-DD"T"hh:mm:ss.s<TZD>

The "T" marker is optional. TZD is time zone designator (either "Z", or "+hh:mm" or "-hh:mm").

This function is not exported.

No arguments.

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)

indicator_date_parsable

Usage:

 indicator_date_parsable() -> [status, msg, payload, meta]

Dates are parsable by CPAN::Changes.

This function is not exported.

No arguments.

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)

indicator_english

Usage:

 indicator_english() -> [status, msg, payload, meta]

Preamble and change entries are in English.

This function is not exported.

No arguments.

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)

indicator_has_releases

Usage:

 indicator_has_releases() -> [status, msg, payload, meta]

There is at least one release.

The lack of releases could mean the releases are misparsed as preamble due to inappropriate format.

This function is not exported.

No arguments.

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)

indicator_no_duplicate_version

Usage:

 indicator_no_duplicate_version() -> [status, msg, payload, meta]

Versions are unique.

This function is not exported.

No arguments.

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)

indicator_no_empty_group

Usage:

 indicator_no_empty_group() -> [status, msg, payload, meta]

No empty change group.

This function is not exported.

No arguments.

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)

indicator_no_shouting

Usage:

 indicator_no_shouting() -> [status, msg, payload, meta]

No shouting in the change lines, e.g. "dammit!!!".

This function is not exported.

No arguments.

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)

indicator_no_useless_text

Usage:

 indicator_no_useless_text() -> [status, msg, payload, meta]

No useless text in the change lines, e.g. "Release v1.23".

This function is not exported.

No arguments.

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)

indicator_not_all_caps

Usage:

 indicator_not_all_caps() -> [status, msg, payload, meta]

No all-caps (shouting) text in the change lines, e.g. "REMOVE THE BUG!".

This function is not exported.

No arguments.

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)

indicator_not_too_wide

Usage:

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

Text is not too wide.

This function is not exported.

Arguments ('*' denotes required arguments):

  • max_width => uint (default: 125)

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)

indicator_parsable

Usage:

 indicator_parsable() -> [status, msg, payload, meta]

Parseable by CPAN::Changes.

This function is not exported.

No arguments.

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)

indicator_preamble_has_no_releases

Usage:

 indicator_preamble_has_no_releases() -> [status, msg, payload, meta]

There does not look like releases in the preamble.

This might mean the releases are misparsed as preamble due to inappropriate format.

This function is not exported.

No arguments.

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)

indicator_release_dates_not_future

Usage:

 indicator_release_dates_not_future() -> [status, msg, payload, meta]

No release dates are in the future.

This function is not exported.

No arguments.

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)

indicator_releases_in_descending_date_order

Usage:

 indicator_releases_in_descending_date_order() -> [status, msg, payload, meta]

Releases are ordered descendingly by its date (newest first).

This order is, in my opinion, the best order optimized for reading by users.

This function is not exported.

No arguments.

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)

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/CPAN-Changes-Cwalitee.

SOURCE

Source repository is at https://github.com/perlancar/perl-CPAN-Changes-Cwalitee.

BUGS

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

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.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 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.