From 2176b2fe3471a42cb9ee468a0954ddbb048586fa Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sat, 17 Nov 2018 12:27:26 -0800 Subject: [PATCH] RT#127679, added arg -npro to avoid reading unexpected .perltidyrc --- t/filter_example.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/filter_example.t b/t/filter_example.t index 1e27fb5f..d6b63942 100755 --- a/t/filter_example.t +++ b/t/filter_example.t @@ -48,13 +48,12 @@ my $output; my $stderr_string; my $errorfile_string; my $err = Perl::Tidy::perltidy( - argv => '', + argv => '-npro', # fix for RT#127679, avoid reading unwanted .perltidyrc prefilter => sub { $_ = $_[0]; s/^\s*method\s+(\w.*)/sub METHOD_$1/gm; return $_ }, postfilter => sub { $_ = $_[0]; s/sub\s+METHOD_/method /gm; return $_ }, source => \$source, destination => \$output, - argv => '', # for safety; hide any ARGV from perltidy stderr => \$stderr_string, errorfile => \$errorfile_string, # not used when -se flag is set ); -- 2.39.5