Mardem-PerlRefactoringSupport

DESCRIPTION

Perl-Critic Policies for simple and isolated Refactoring-Support.

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:

but these are for some bigger scans, so these new policies should check (or begin) in smaller chunks:

  1. ProhibitReturnBooleanAsInt - return boolean as int "return 1;"
  2. ProhibitConditionComplexity - condition complexity "if/while/for/... (...){}"
  3. ProhibitManyConditionsInSub - subs has many conditionals "if, while, for, ..."
  4. ProhibitLargeBlock - large code block as statement count "{...}"
  5. ProhibitBlockComplexity - code block complexity "{...}"
  6. ProhibitLargeSub - large subs as statement count

INSTALLATION

To install this module, run the following commands:

  perl Build.PL
  ./Build
  ./Build test
  ./Build install

SUPPORT AND DOCUMENTATION

Each policy has its own detailed documentation.

BUG REPORTS

Please report bugs on GitHub.

The source code repository can be found at https://github.com/mardem1/perl-critic-mardem

AUTHOR

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.

DISCLAIMER

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.