Perl::Critic::Mardem - Perl-Critic policies for simple and isolated Refactoring-Support.
Version 0.04
This Perl-Crictic Policy-Modules should help where to start a safe refactoring in old leagacy Perl code.
The McCabe complexity check within the standard Perl-Critic Module are a good overall starting point see:
Perl::Critic::Policy::Modules::ProhibitExcessMainComplexity
Perl::Critic::Policy::Subroutines::ProhibitExcessComplexity
but these are for some bigger scans, so these new policies should check (or begin) in smaller chunks:
return boolean as int "return 1;"
condition complexity "if/while/for/... (...){}"
subs has many conditionals "if, while, for, ..."
large code block as statement count "{...}"
code block complexity "{...}"
large subs as statement count
This module has no functionality, but instead contains documentation for this distribution and acts as a means of pulling other modules into a bundle. All of the Policy modules contained herein will have an "AFFILIATION" section announcing their participation in this grouping.
Please report bugs on GitHub.
The source code repository can be found at https://github.com/mardem1/perl-critic-mardem
Markus Demml, mardem@cpan.com
Copyright (c) 2022, Markus Demml
This library is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. The full text of this license can be found in the LICENSE file included with this module.
This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install Perl::Critic::Mardem, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Mardem
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Mardem
For more information on module installation, please visit the detailed CPAN module installation guide.