Login
Implement the TODO item P::C::P::Subroutines::ProhibitUnusedPrivateSubroutines.
authorTom Wyant <harryfmudd@comcast.net>
Sat, 31 Oct 2009 02:28:53 +0000 (02:28 +0000)
committerTom Wyant <harryfmudd@comcast.net>
Sat, 31 Oct 2009 02:28:53 +0000 (02:28 +0000)
commit6ddbc15f67df68dba9419adb5a3522dd3bde6146
tree801d66a3044fb38d10e1f97c74501c8e7bba04ed
parent41839dc8c48569a4b321d2cded2edd9ac301a2dd
Implement the TODO item P::C::P::Subroutines::ProhibitUnusedPrivateSubroutines.
This takes the same configuration parameters as
P::C::P::Subroutines::ProtectPrivateSubroutines.

Changes in other modules were self-compliance issues, which were solved by
removing the subroutines that were found in violation (after checking with
'ack' to see if they were truly not referred to!):
  - Perl::Critic::Policy::_get_source_file;
  - Perl::Critic::PolicyConfig::_validate_maximum_violations_per_document;
  - Perl::Critic::Policy::Documentation::PodSpelling::_set_spell_command;
  - Perl::Critic::Policy::NamingConventions::Capitalization::_local_variable.

There appear to be a couple distribution-private subroutines whose names
begin with single underscores:
  - Perl::Critic::PolicyParameter::_get_behavior_values;
  - Perl::Critic::PolicyParameter::_get_description_with_trailing_period.
These were dealt with by adding them to the 'accept' list in
xt/author/40_perlcriticrc-code.
TODO.pod
lib/Perl/Critic/Policy.pm
lib/Perl/Critic/Policy/Documentation/PodSpelling.pm
lib/Perl/Critic/Policy/NamingConventions/Capitalization.pm
lib/Perl/Critic/Policy/Subroutines/ProhibitUnusedPrivateSubroutines.pm [new file with mode: 0644]
lib/Perl/Critic/PolicyConfig.pm
t/Subroutines/ProhibitUnusedPrivateSubroutines.run [new file with mode: 0644]
xt/author/40_perlcriticrc-code