You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by st...@apache.org on 2005/11/02 21:16:48 UTC
svn commit: r330346 - /perl/Apache-Test/trunk/lib/Apache/TestHarness.pm
Author: stas
Date: Wed Nov 2 12:16:45 2005
New Revision: 330346
URL: http://svn.apache.org/viewcvs?rev=330346&view=rev
Log:
don't use the implicit $_ as it gets ruined by function calls
Modified:
perl/Apache-Test/trunk/lib/Apache/TestHarness.pm
Modified: perl/Apache-Test/trunk/lib/Apache/TestHarness.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestHarness.pm?rev=330346&r1=330345&r2=330346&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestHarness.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestHarness.pm Wed Nov 2 12:16:45 2005
@@ -110,20 +110,20 @@
sub prune {
my($self, @tests) = @_;
my(@new_tests, %skip_dirs);
- local $_;
- for (@tests) {
- next if /\.#/; # skip temp emacs files
- my $dir = dirname $_;
- if (m:\Wall\.t$:) {
- unless ($self->run_t($_)) {
+ for my $test (@tests) {
+ next if $test =~ /\.#/; # skip temp emacs files
+ my $dir = dirname $test;
+ if ($test =~ m:\Wall\.t$:) {
+ unless ($self->run_t($test)) {
$skip_dirs{$dir} = 1;
- @new_tests = grep { m:\Wall\.t$: || not $skip_dirs{dirname $_} } @new_tests;
- push @new_tests, $_;
+ @new_tests = grep { $test =~ m:\Wall\.t$: ||
+ not $skip_dirs{dirname $test} } @new_tests;
+ push @new_tests, $test;
}
}
elsif (!$skip_dirs{$dir}) {
- push @new_tests, $_;
+ push @new_tests, $test;
}
}