line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Critic::Policy::Freenode::IndirectObjectNotation; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
772
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use parent 'Perl::Critic::Policy::Community::IndirectObjectNotation'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = 'v1.0.1'; |
9
|
|
|
|
|
|
|
|
10
|
0
|
|
|
0
|
1
|
|
sub default_themes { 'freenode' } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
1; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Perl::Critic::Policy::Freenode::IndirectObjectNotation - Don't call methods |
17
|
|
|
|
|
|
|
indirectly |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Legacy C<freenode> theme policy alias. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 POLICY MOVED |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
This policy has been moved to the C<community> theme and renamed to |
26
|
|
|
|
|
|
|
L<Perl::Critic::Policy::Community::IndirectObjectNotation>. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 AFFILIATION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This policy is part of L<Perl::Critic::Freenode>. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 CONFIGURATION |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
This policy can be configured, in the same way as its parent policy |
35
|
|
|
|
|
|
|
L<Perl::Critic::Policy::Objects::ProhibitIndirectSyntax>, to attempt to forbid |
36
|
|
|
|
|
|
|
additional method names from being called indirectly. Be aware this may lead to |
37
|
|
|
|
|
|
|
false positives as it is difficult to detect indirect object notation by static |
38
|
|
|
|
|
|
|
analysis. The C<new> subroutine is always forbidden in addition to these. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
[Freenode::IndirectObjectNotation] |
41
|
|
|
|
|
|
|
forbid = create destroy |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHOR |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Dan Book, C<dbook@cpan.org> |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Copyright 2015, Dan Book. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This library is free software; you may redistribute it and/or modify it under |
52
|
|
|
|
|
|
|
the terms of the Artistic License version 2.0. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SEE ALSO |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
L<Perl::Critic>, L<Perl::Critic::Community> |