🌻 📖 Test2::Tools::PerlCritic::Util

NAME

Test2::Tools::PerlCritic::Util - Utility functions

VERSION

version 0.08

SYNOPSIS

 use Test2::Tools::PerlCritic::Util qw( perl_critic_config_id );

DESCRIPTION

This module provides some utility functions useful when working with Perl::Critic testing.

FUNCTIONS

perl_critic_config_id

 my $id = perl_critic_config_id $config;
 my $id = perl_critic_config_id;

Computes an id of the Perl::Critic configuration. The argument $config should be either an instance of Perl::Critic or Perl::Critic::Config. If not provided then a default Perl::Critic::Config will be created.

CAVEAT: This isn't really possible with 100% accuracy with the Perl::Critic API, so we make some assumptions common conventions that typically do hold in virtually all cases.

AUTHOR

Graham Ollis <plicease@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019-2024 by Graham Ollis.

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