From: Vincent Pit Date: Mon, 19 Apr 2010 13:34:42 +0000 (+0200) Subject: This is 0.05 X-Git-Tag: v0.05^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FPerl-Critic-Policy-Dynamic-NoIndirect.git;a=commitdiff_plain;h=5ba9674231d569470dfc375c5af687fb5f5b6424 This is 0.05 --- diff --git a/Changes b/Changes index 1975a5d..5591c6c 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for Perl-Critic-Policy-Dynamic-NoIndirect +0.05 2010-04-19 13:35 UTC + + Fix : Force the correct line number and file name before evaluating + the code. + + Fix : Work around Kwalitee test misfailures. + 0.04 2009-07-14 19:50 UTC + Add : Report indirect method calls on blocks. + Doc : Caveats. diff --git a/META.yml b/META.yml index 60ffa11..032a4c7 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Perl-Critic-Policy-Dynamic-NoIndirect -version: 0.04 +version: 0.05 abstract: Perl::Critic policy against indirect method calls. author: - Vincent Pit @@ -9,13 +9,18 @@ distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 build_requires: + base: 0 + Carp: 0 ExtUtils::MakeMaker: 0 + indirect: 0.20 + Perl::Critic::DynamicPolicy: 0 Perl::Critic::TestUtils: 0 + Perl::Critic::Utils: 0 Test::More: 0 requires: base: 0 Carp: 0 - indirect: 0.16 + indirect: 0.20 perl: 5.008 Perl::Critic::DynamicPolicy: 0 Perl::Critic::Utils: 0 @@ -28,7 +33,8 @@ no_index: directory: - t - inc -generated_by: ExtUtils::MakeMaker version 6.54 +generated_by: ExtUtils::MakeMaker version 6.56 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 +dynamic_config: 0 diff --git a/README b/README index 8114315..2718ee4 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME indirect method calls. VERSION - Version 0.04 + Version 0.05 DESCRIPTION This Perl::Critic dynamic policy reports any use of indirect object @@ -14,7 +14,7 @@ DESCRIPTION as such is implemented as a subclass of Perl::Critic::DynamicPolicy. CAVEATS - The uses of the indirect pragma inside the auditted code take precedence + The uses of the indirect pragma inside the audited 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 @@ -31,7 +31,17 @@ DEPENDENCIES Perl::Critic, Perl::Critic::Dynamic. - indirect. + indirect 0.20. + +SEE ALSO + Perl::Critic::Policy::Objects::ProhibitIndirectSyntax is a Perl::Critic + policy that statically checks for indirect constructs. But to be static + it has to be very restricted : you have to manually specify which + subroutine names are methods for which the indirect form should be + forbidden. This can lead to false positives (a subroutine with the name + you gave is defined in the current scope) and negatives (indirect + constructs for methods you didn't specify). But you don't need to + actually compile (or run, as it's more or less the same thing) the code. AUTHOR Vincent Pit, "", . @@ -49,10 +59,10 @@ BUGS SUPPORT You can find documentation for this module with the perldoc command. - perldoc Perl::Critic::Policy::Dynamic::NoIndirect + perldoc Perl::Critic::Policy::Dynamic::NoIndirect COPYRIGHT & LICENSE - Copyright 2009 Vincent Pit, all rights reserved. + Copyright 2009,2010 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/Perl/Critic/Policy/Dynamic/NoIndirect.pm b/lib/Perl/Critic/Policy/Dynamic/NoIndirect.pm index 1132c57..3528d0b 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.04 +Version 0.05 =cut -our $VERSION = '0.04'; +our $VERSION = '0.05'; =head1 DESCRIPTION