File Coverage

blib/lib/Perl/Critic/Mardem.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Perl::Critic::Mardem;
2              
3 2     2   615504 use utf8;
  2         6  
  2         23  
4              
5 2     2   143 use 5.010;
  2         18  
6              
7 2     2   15 use strict;
  2         11  
  2         105  
8 2     2   11 use warnings;
  2         4  
  2         245  
9              
10             our $VERSION = '0.06';
11              
12             1;
13              
14             __END__
15              
16             #-----------------------------------------------------------------------------
17              
18             =pod
19              
20             =encoding utf8
21              
22             =head1 NAME
23              
24             Perl::Critic::Mardem - Perl-Critic policies for isolated Refactoring-Support.
25              
26             =head1 VERSION
27              
28             Version 0.06
29              
30             =head1 DESCRIPTION
31              
32             This Perl-Critic Policy-Modules should help where to start a safe
33             refactoring in old legacy Perl code.
34              
35             The McCabe complexity check within the standard Perl-Critic Module are a good
36             overall starting point see:
37              
38             =over 4
39              
40             =item * L<Perl::Critic::Policy::Modules::ProhibitExcessMainComplexity>
41              
42             =item * L<Perl::Critic::Policy::Subroutines::ProhibitExcessComplexity>
43              
44             =back
45              
46             but these are for some bigger scans, so these new policies should check (or begin) in smaller chunks:
47              
48             =head2 L<Perl::Critic::Policy::Mardem::ProhibitBlockComplexity>
49              
50             code block complexity "{...}"
51              
52             =head2 L<Perl::Critic::Policy::Mardem::ProhibitConditionComplexity>
53              
54             condition complexity "if/while/for/... (...){}"
55              
56             =head2 L<Perl::Critic::Policy::Mardem::ProhibitFileSize>
57              
58             large files as byte or char count
59              
60             =head2 L<Perl::Critic::Policy::Mardem::ProhibitLargeBlock>
61              
62             large code block as statement count "{...}"
63              
64             =head2 L<Perl::Critic::Policy::Mardem::ProhibitLargeFile>
65              
66             large files as line count
67              
68             =head2 L<Perl::Critic::Policy::Mardem::ProhibitLargeSub>
69              
70             large subs as statement count
71              
72             =head2 L<Perl::Critic::Policy::Mardem::ProhibitManyConditionsInSub>
73              
74             subs has many conditionals "if, while, for, ..."
75              
76             =head2 L<Perl::Critic::Policy::Mardem::ProhibitReturnBooleanAsInt>
77              
78             return boolean as int "return 1;"
79              
80             =head1 AFFILIATION
81              
82             This module has no functionality, but instead contains documentation for this
83             distribution and acts as a means of pulling other modules into a bundle.
84             All of the Policy modules contained herein will have an "AFFILIATION" section
85             announcing their participation in this grouping.
86              
87             =head1 BUG REPORTS
88              
89             Please report bugs on GitHub.
90              
91             The source code repository can be found at L<https://github.com/mardem1/perl-critic-mardem>
92              
93             =head1 AUTHOR
94              
95             Markus Demml, mardem@cpan.com
96              
97             =head1 LICENSE AND COPYRIGHT
98              
99             Copyright (c) 2024, Markus Demml
100              
101             This library is free software; you can redistribute it and/or modify it
102             under the same terms as the Perl 5 programming language system itself.
103             The full text of this license can be found in the LICENSE file included
104             with this module.
105              
106             =head1 DISCLAIMER
107              
108             This package is distributed in the hope that it will be useful, but WITHOUT
109             ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
110             FOR A PARTICULAR PURPOSE.
111              
112             =cut