[Rt-commit] rtfm branch, 2.4/perlcritic, created. 2.4.3-10-g6b0f30c
Alex Vandiver
alexmv at bestpractical.com
Wed Jun 29 17:17:44 EDT 2011
The branch, 2.4/perlcritic has been created
at 6b0f30ca2604f378a87b9ff1d893d7eaf5d35268 (commit)
- Log -----------------------------------------------------------------
commit 6b0f30ca2604f378a87b9ff1d893d7eaf5d35268
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jun 29 17:11:02 2011 -0400
Don't modify $_ in map and grep
diff --git a/html/RTFM/Article/Edit.html b/html/RTFM/Article/Edit.html
index 531c849..50b4294 100644
--- a/html/RTFM/Article/Edit.html
+++ b/html/RTFM/Article/Edit.html
@@ -189,10 +189,11 @@ elsif ( $id eq 'new' ) {
}
@values = grep $_ ne '',
map {
- s/\r+\n/\n/g;
- s/^\s+//;
- s/\s+$//;
- $_;
+ my $value = $_;
+ $value =~ s/\r+\n/\n/g;
+ $value =~ s/^\s+//;
+ $value =~ s/\s+$//;
+ $value;
}
grep defined, @values;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list