Title: [opsview] [9555] Fix run_perltidy where multiple files given on command line
Revision
9555
Author
tvoon
Date
2012-07-12 22:48:02 +0100 (Thu, 12 Jul 2012)

Log Message

Fix run_perltidy where multiple files given on command line

Modified Paths


Modified: trunk/tools/run_perltidy
===================================================================
--- trunk/tools/run_perltidy	2012-07-12 15:43:39 UTC (rev 9554)
+++ trunk/tools/run_perltidy	2012-07-12 21:48:02 UTC (rev 9555)
@@ -27,7 +27,12 @@
 use Regexp::Common qw /balanced/;
 use FindBin qw($Bin);
 
-while ( my $search_base = shift @ARGV ) {
+my @files = @ARGV;
+
+# Need to reset @ARGV, otherwise Perl::Tidy seems to use it
+@ARGV = ();
+
+while ( my $search_base = shift @files ) {
     my $file_iterator = File::Next::files($search_base);
 
     while ( defined( my $file = $file_iterator->() ) ) {

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to