From: Vincent Pit Date: Tue, 14 Jul 2009 19:47:26 +0000 (+0200) Subject: This is 0.04 X-Git-Tag: v0.04^0 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=4b561e89d1b18f98e50315fed79705e4b4c26edd;p=perl%2Fmodules%2FPerl-Critic-Policy-Dynamic-NoIndirect.git This is 0.04 --- diff --git a/Changes b/Changes index eeded93..1975a5d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for Perl-Critic-Policy-Dynamic-NoIndirect +0.04 2009-07-14 19:50 UTC + + Add : Report indirect method calls on blocks. + + Doc : Caveats. + + Upd : Bump indirect dependency to 0.16. + 0.03 2009-07-09 09:05 UTC + Add : A sample script. + Fix : Multiple violations with the same method on the same line were diff --git a/META.yml b/META.yml index 6bc3543..60ffa11 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Perl-Critic-Policy-Dynamic-NoIndirect -version: 0.03 +version: 0.04 abstract: Perl::Critic policy against indirect method calls. author: - Vincent Pit @@ -15,7 +15,7 @@ build_requires: requires: base: 0 Carp: 0 - indirect: 0.15 + indirect: 0.16 perl: 5.008 Perl::Critic::DynamicPolicy: 0 Perl::Critic::Utils: 0 diff --git a/README b/README index 86417b8..8114315 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME indirect method calls. VERSION - Version 0.03 + Version 0.04 DESCRIPTION This Perl::Critic dynamic policy reports any use of indirect object @@ -13,6 +13,19 @@ DESCRIPTION Since it wraps around indirect, it needs to compile the audited code and as such is implemented as a subclass of Perl::Critic::DynamicPolicy. +CAVEATS + The uses of the indirect pragma inside the auditted code take precedence + over this policy. Hence no violations will be reported for indirect + method calls that are located inside the lexical scope of "use indirect" + or "no indirect hook => ...". Occurrences of "no indirect" won't be a + problem. + + Since the reports generated by indirect are remapped to the + corresponding PPI::Element objects, the order in which the violations + are returned is different from the order given by indirect : the former + is the document order (top to bottom, left to right) while the latter is + the optree order (arguments before function calls). + DEPENDENCIES perl 5.8, Carp. diff --git a/lib/Perl/Critic/Policy/Dynamic/NoIndirect.pm b/lib/Perl/Critic/Policy/Dynamic/NoIndirect.pm index 411da99..3233efc 100644 --- a/lib/Perl/Critic/Policy/Dynamic/NoIndirect.pm +++ b/lib/Perl/Critic/Policy/Dynamic/NoIndirect.pm @@ -11,11 +11,11 @@ Perl::Critic::Policy::Dynamic::NoIndirect - Perl::Critic policy against indirect =head1 VERSION -Version 0.03 +Version 0.04 =cut -our $VERSION = '0.03'; +our $VERSION = '0.04'; =head1 DESCRIPTION