NAME

Dist::Conformance::Check::CriticProfile - The perlcritic profile starts with the header of its template

VERSION

version 0.001

DESCRIPTION

A profile is told apart by its first line. The two profiles of the packaging-perl skill each start with a header that says which perl it is for, so the strict flavor and the compat flavor name different templates, and each expects the header of its own.

The check passes when the first line of the file starts with header. It fails when the file is missing, when the first line starts with one of outdated, which is an older profile of the same standard, or a profile for another perl, and when it starts with neither. The detail quotes the first line.

The update writes the template when the file is missing. A profile that is there but differs usually has changes of its own, such as exemptions, so it is replaced only when replace is true; otherwise the update says to merge the template by hand.

METHODS

The header, or the first line of the template.

check

update

Writes the template when the profile is missing, or when it is not current and replace is true.

FUNCTIONS

first_line

($text). The first line of $text, without its newline.

IN A FLAVOR

checks:
  CriticProfile:
    file: .perlcriticrc
    template: templates/perlcriticrc
    outdated:
      - '# Troglodyne perlcritic policy'
    replace: false

CONFIGURATION

file

Required. The path of the profile.

template

Required. The template of the current profile.

header

The text that the first line of a current profile starts with. Default the first line of the template, with its variables filled in.

outdated

Texts that the first line of an older profile starts with. Default none.

replace

Whether an update overwrites a profile that is not current. Default false.

SEE ALSO

Please see those modules/websites for more information related to this module.

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/Troglodyne-Internet-Widgets/Dist-Conformance/issues

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.

AUTHORS

Current Maintainers:

  • George S. Baugh <george@troglodyne.net>

COPYRIGHT AND LICENSE

Copyright (c) 2026 Troglodyne LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.