| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Perl::Critic::PetPeeves::JTRAMMELL; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
942
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
45
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
73
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Perl::Critic::PetPeeves::JTRAMMELL - policies to prohibit/require my pet peeves |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Module C<Perl::Critic::PetPeeves::JTRAMMELL> provides policies that I want that |
|
14
|
|
|
|
|
|
|
haven't already been implemented elsewhere. So far this is: |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=over 4 |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=item Perl::Critic::Policy::Variables::ProhibitUselessInitialization |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Considers unnecessary initialization a style violation, I<e.g.>: |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $foo = undef; # assignment not needed |
|
23
|
|
|
|
|
|
|
my @bar = (); # ditto |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=back |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 AUTHOR |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
John Trammell C<< <johntrammell =at= gmail !dot! com> >> |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 BUGS |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
|
34
|
|
|
|
|
|
|
C<bug-perl-critic-petpeeves-jtrammell at rt.cpan.org>, or through the web interface at |
|
35
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Critic-PetPeeves-JTRAMMELL>. |
|
36
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
|
37
|
|
|
|
|
|
|
your bug as I make changes. |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SUPPORT |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
perldoc Perl::Critic::PetPeeves::JTRAMMELL |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
You can also look for information at: |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=over 4 |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Perl-Critic-PetPeeves-JTRAMMELL> |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=item * CPAN Ratings |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Perl-Critic-PetPeeves-JTRAMMELL> |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic-PetPeeves-JTRAMMELL> |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item * Search CPAN |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Perl-Critic-PetPeeves-JTRAMMELL> |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=back |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Copyright 2011 John Trammell, all rights reserved. |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
74
|
|
|
|
|
|
|
under the same terms as Perl itself. |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |