]> git.vpit.fr Git - perl/modules/Perl-Critic-Policy-Dynamic-NoIndirect.git/blob - README
Update VPIT::TestHelpers to 15e8aee3
[perl/modules/Perl-Critic-Policy-Dynamic-NoIndirect.git] / README
1 NAME
2     Perl::Critic::Policy::Dynamic::NoIndirect - Perl::Critic policy against
3     indirect method calls.
4
5 VERSION
6     Version 0.06
7
8 DESCRIPTION
9     This Perl::Critic dynamic policy reports any use of indirect object
10     syntax with a 'stern' severity. It's listed under the 'dynamic' and
11     'maintenance' themes.
12
13     Since it wraps around indirect, it needs to compile the audited code and
14     as such is implemented as a subclass of Perl::Critic::DynamicPolicy.
15
16 CAVEATS
17     The uses of the indirect pragma inside the audited code take precedence
18     over this policy. Hence no violations will be reported for indirect
19     method calls that are located inside the lexical scope of "use indirect"
20     or "no indirect hook => ...". Occurrences of "no indirect" won't be a
21     problem.
22
23     Since the reports generated by indirect are remapped to the
24     corresponding PPI::Element objects, the order in which the violations
25     are returned is different from the order given by indirect : the former
26     is the document order (top to bottom, left to right) while the latter is
27     the optree order (arguments before function calls).
28
29 DEPENDENCIES
30     perl 5.8, Carp.
31
32     Perl::Critic, Perl::Critic::Dynamic.
33
34     indirect 0.20.
35
36 SEE ALSO
37     Perl::Critic::Policy::Objects::ProhibitIndirectSyntax is a Perl::Critic
38     policy that statically checks for indirect constructs. But to be static
39     it has to be very restricted : you have to manually specify which
40     subroutine names are methods for which the indirect form should be
41     forbidden. This can lead to false positives (a subroutine with the name
42     you gave is defined in the current scope) and negatives (indirect
43     constructs for methods you didn't specify). But you don't need to
44     actually compile (or run, as it's more or less the same thing) the code.
45
46 AUTHOR
47     Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
48
49     You can contact me by mail or on "irc.perl.org" (vincent).
50
51 BUGS
52     Please report any bugs or feature requests to
53     "bug-perl-critic-policy-dynamic-noindirect at rt.cpan.org", or through
54     the web interface at
55     <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Critic-Policy-Dynam
56     ic-NoIndirect>. I will be notified, and then you'll automatically be
57     notified of progress on your bug as I make changes.
58
59 SUPPORT
60     You can find documentation for this module with the perldoc command.
61
62         perldoc Perl::Critic::Policy::Dynamic::NoIndirect
63
64 COPYRIGHT & LICENSE
65     Copyright 2009,2010,2011 Vincent Pit, all rights reserved.
66
67     This program is free software; you can redistribute it and/or modify it
68     under the same terms as Perl itself.
69