[libcode-tidyall-perl] 87/374: make plugins_for_path public

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 22:25:54 UTC 2013


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libcode-tidyall-perl.

commit e334c7eb88e67ffa2a48252eeba4c2e486e6d8a3
Author: Jonathan Swartz <swartz at pobox.com>
Date:   Fri Jul 13 15:48:11 2012 -0700

    make plugins_for_path public
---
 lib/Code/TidyAll.pm |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/Code/TidyAll.pm b/lib/Code/TidyAll.pm
index 42ce841..e403730 100644
--- a/lib/Code/TidyAll.pm
+++ b/lib/Code/TidyAll.pm
@@ -187,7 +187,7 @@ sub process_file {
 sub process_source {
     my ( $self, $contents, $path ) = @_;
 
-    my @plugins = $self->_plugins_for_path($path);
+    my @plugins = $self->plugins_for_path($path);
     if ( !@plugins ) {
         $self->msg( "[no plugins apply%s] %s",
             $self->mode ? " for mode '" . $self->mode . "'" : "", $path )
@@ -349,7 +349,7 @@ sub _find_matched_files {
     return sort( uniq(@matched_files) );
 }
 
-sub _plugins_for_path {
+sub plugins_for_path {
     my ( $self, $path ) = @_;
 
     $self->{plugins_for_path}->{$path} ||=
@@ -542,6 +542,11 @@ L<Code::TidyAll::Result|Code::TidyAll::Result> object.
 Start in the I<start_dir> and work upwards, looking for a C<tidyall.ini>.
 Return the pathname if found or throw an error if not found.
 
+=item plugins_for_path (path)
+
+Given a relative I<path> from the root, return a list of Code::TidyAll::Plugin
+objects that apply to it, or an empty list if no plugins apply.
+
 =back
 
 =cut

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcode-tidyall-perl.git



More information about the Pkg-perl-cvs-commits mailing list