| 1 | package Perl::Critic::Bangs; | ||
| 2 | |||
| 3 | use warnings; | ||
| 4 | use strict; | ||
| 5 | |||
| 6 | =for stopwords Siskel Kael Greil Considine perldoc AnnoCPAN CPAN's Oystein Torget | ||
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | Perl::Critic::Bangs - A collection of handy Perl::Critic policies | ||
| 11 | |||
| 12 | =head1 VERSION | ||
| 13 | |||
| 14 | Version 1.14 | ||
| 15 | |||
| 16 | =cut | ||
| 17 | |||
| 18 | our $VERSION = '1.14'; | ||
| 19 | |||
| 20 | =head1 SYNOPSIS | ||
| 21 | |||
| 22 | Perl::Critic::Bangs is a collection of Perl::Critic policies that | ||
| 23 | will help make your code better. | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | The rules included with the Perl::Critic::Bangs group include: | ||
| 28 | |||
| 29 | =head2 L<Perl::Critic::Policy::Bangs::ProhibitBitwiseOperators> | ||
| 30 | |||
| 31 | Bitwise operators are usually accidentally used instead of logical boolean operators. | ||
| 32 | |||
| 33 | =head2 L<Perl::Critic::Policy::Bangs::ProhibitCommentedOutCode> | ||
| 34 | |||
| 35 | Commented-out code is usually noise. It should be removed. | ||
| 36 | |||
| 37 | =head2 L<Perl::Critic::Policy::Bangs::ProhibitFlagComments> | ||
| 38 | |||
| 39 | Watch for comments like "XXX", "TODO", etc. | ||
| 40 | |||
| 41 | =head2 L<Perl::Critic::Policy::Bangs::ProhibitNoPlan> | ||
| 42 | |||
| 43 | Tests should have a plan. | ||
| 44 | |||
| 45 | =head2 L<Perl::Critic::Policy::Bangs::ProhibitNumberedNames> | ||
| 46 | |||
| 47 | Subroutines and variables like C<$user> and C<$user2> are insufficiently | ||
| 48 | distinguished. | ||
| 49 | |||
| 50 | =head2 L<Perl::Critic::Policy::Bangs::ProhibitRefProtoOrProto> | ||
| 51 | |||
| 52 | Determining the class in a constructor by using C<ref($proto) || $proto> is usually | ||
| 53 | a cut-n-paste that is incorrect. | ||
| 54 | |||
| 55 | =head2 L<Perl::Critic::Policy::Bangs::ProhibitUselessRegexModifiers> | ||
| 56 | |||
| 57 | Adding modifiers to a regular expression made up entirely of a | ||
| 58 | variable created with C<qr()> is usually not doing what you expect. | ||
| 59 | |||
| 60 | =head2 L<Perl::Critic::Policy::Bangs::ProhibitVagueNames> | ||
| 61 | |||
| 62 | Vague variables and subroutines like C<$data> or C<$info> are not | ||
| 63 | descriptive enough. | ||
| 64 | |||
| 65 | =head1 WHY IS IT CALLED Perl::Critic::Bangs? | ||
| 66 | |||
| 67 | I didn't want to call it "Perl::Critic::Lester" or "Perl::Critic::Petdance" | ||
| 68 | since that would make it sound like they were only my rules. Other people | ||
| 69 | will likely include their own set of rules, too. | ||
| 70 | |||
| 71 | So I started thinking of names of famous critics. Ebert, Siskel, | ||
| 72 | Kael, etc. What about music critics? Greil Marcus, J.D. Considine... | ||
| 73 | Lester Bangs! He's even got my name in his! So there was the name. | ||
| 74 | |||
| 75 | See http://en.wikipedia.org/wiki/Lester_Bangs for more on Lester Bangs. | ||
| 76 | |||
| 77 | =head1 AUTHOR | ||
| 78 | |||
| 79 | Andy Lester, C<< <andy at petdance.com> >> | ||
| 80 | |||
| 81 | =head1 BUGS | ||
| 82 | |||
| 83 | Please report any bugs or feature requests to | ||
| 84 | C<bug-perl-critic-bangs at rt.cpan.org>, or through the web interface at | ||
| 85 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Critic-Bangs>. | ||
| 86 | I will be notified, and then you'll automatically be notified of progress on | ||
| 87 | your bug as I make changes. | ||
| 88 | |||
| 89 | =head1 SUPPORT | ||
| 90 | |||
| 91 | You can find documentation for this module with the perldoc command. | ||
| 92 | |||
| 93 | perldoc Perl::Critic::Bangs | ||
| 94 | |||
| 95 | You can also look for information at: | ||
| 96 | |||
| 97 | =over 4 | ||
| 98 | |||
| 99 | =item * AnnoCPAN: Annotated CPAN documentation | ||
| 100 | |||
| 101 | L<http://annocpan.org/dist/Perl-Critic-Bangs> | ||
| 102 | |||
| 103 | =item * CPAN Ratings | ||
| 104 | |||
| 105 | L<http://cpanratings.perl.org/d/Perl-Critic-Bangs> | ||
| 106 | |||
| 107 | =item * RT: CPAN's request tracker | ||
| 108 | |||
| 109 | L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic-Bangs> | ||
| 110 | |||
| 111 | =item * Search CPAN | ||
| 112 | |||
| 113 | L<http://search.cpan.org/dist/Perl-Critic-Bangs> | ||
| 114 | |||
| 115 | =item * Source code repository | ||
| 116 | |||
| 117 | L<http://github.com/petdance/perl-critic-bangs> | ||
| 118 | |||
| 119 | =back | ||
| 120 | |||
| 121 | =head1 ACKNOWLEDGMENTS | ||
| 122 | |||
| 123 | Thanks to | ||
| 124 | Ville Skyttä, | ||
| 125 | William Braswell, | ||
| 126 | Oliver Trosien, | ||
| 127 | Fred Moyer, | ||
| 128 | Andy Moore, | ||
| 129 | Oystein Torget, | ||
| 130 | Mike O'Regan, | ||
| 131 | Elliot Shank | ||
| 132 | and the rest of the Perl::Critic team for ongoing support. | ||
| 133 | |||
| 134 | =head1 COPYRIGHT | ||
| 135 | |||
| 136 | Copyright 2006-2021 Andy Lester. | ||
| 137 | |||
| 138 | This program is free software; you can redistribute it and/or modify | ||
| 139 | it under the terms of the Artistic License 2.0. | ||
| 140 | |||
| 141 | =cut | ||
| 142 | |||
| 143 | 1; # End of Perl::Critic::Bangs |