[libcode-tidyall-perl] 69/374: simplify

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 22:25:51 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 66762fd5abbbc6b8ba093ab6662f424b6b4fd292
Author: Jonathan Swartz <swartz at pobox.com>
Date:   Tue Jul 3 14:00:55 2012 -0700

    simplify
---
 lib/Code/TidyAll/Plugin/PerlCritic.pm |    1 -
 lib/Code/TidyAll/Plugin/PerlTidy.pm   |   20 ++++----------------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/lib/Code/TidyAll/Plugin/PerlCritic.pm b/lib/Code/TidyAll/Plugin/PerlCritic.pm
index d80806f..bc1c71c 100644
--- a/lib/Code/TidyAll/Plugin/PerlCritic.pm
+++ b/lib/Code/TidyAll/Plugin/PerlCritic.pm
@@ -1,5 +1,4 @@
 package Code::TidyAll::Plugin::PerlCritic;
-use Code::TidyAll::Util qw(write_file);
 use Perl::Critic::Command qw();
 use Capture::Tiny qw(capture_merged);
 use strict;
diff --git a/lib/Code/TidyAll/Plugin/PerlTidy.pm b/lib/Code/TidyAll/Plugin/PerlTidy.pm
index 6cb630a..14d907f 100644
--- a/lib/Code/TidyAll/Plugin/PerlTidy.pm
+++ b/lib/Code/TidyAll/Plugin/PerlTidy.pm
@@ -1,5 +1,5 @@
 package Code::TidyAll::Plugin::PerlTidy;
-use Code::TidyAll::Util qw(can_load);
+use Perl::Tidy;
 use Hash::MoreUtils qw(slice_exists);
 use strict;
 use warnings;
@@ -7,18 +7,15 @@ use base qw(Code::TidyAll::Plugin);
 
 sub process_source {
     my ( $self, $source ) = @_;
-    my $options            = $self->options;
-    my $perl_tidy_class    = $self->options->{perl_tidy_class} || 'Perl::Tidy';
-    my $perl_tidy_function = $perl_tidy_class . "::perltidy";
-    die "cannot load '$perl_tidy_class'" unless can_load($perl_tidy_class);
+    my $options = $self->options;
 
     # Determine parameters
     #
-    my %params = slice_exists( $self->options, qw(argv prefilter postfilter) );
+    my %params = slice_exists( $self->options, qw(argv) );
 
     my $errorfile;
     no strict 'refs';
-    &$perl_tidy_function(
+    Perl::Tidy::perltidy(
         %params,
         source      => \$source,
         destination => \my $destination,
@@ -62,13 +59,4 @@ Code::TidyAll::Plugin::PerlTidy - use perltidy with tidyall
 
 Arguments to pass to C<perltidy>.
 
-=item perl_tidy_class
-
-Specify a C<Perl::Tidy> subclass to use instead of C<Perl::Tidy>.
-
-=item prefilter, postfilter
-
-Specify a prefilter and/or postfilter coderef. This can only be specified via
-the L<Code::TidyAll|Code::TidyAll> module API.
-
 =back

-- 
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