summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-10-06 16:10:47 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-10-06 16:10:47 -0400
commitfea76a11bc3673bc6fb523cffd8c325982bf44f7 (patch)
treeaada35d3c682f2e27501925d39517afb4f313cb8
parentf504df45bc57a03aae5173e871bcd5a39e706475 (diff)
remove: Avoid $_ breakage. (Stupid, stupid perl.)
This avoids another one of those $_ scoping issues where a deep call to a function that changes $_ clobbers the array that is being looped over.
-rw-r--r--IkiWiki/Plugin/remove.pm4
-rw-r--r--debian/changelog6
2 files changed, 9 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm
index cf95026c8..68bf9d1ee 100644
--- a/IkiWiki/Plugin/remove.pm
+++ b/IkiWiki/Plugin/remove.pm
@@ -98,7 +98,9 @@ sub removal_confirm ($$@) { #{{{
my $attachment=shift;
my @pages=@_;
- check_canremove($_, $q, $session) foreach @pages;
+ foreach my $page (@pages) {
+ check_canremove($page, $q, $session);
+ }
# Save current form state to allow returning to it later
# without losing any edits.
diff --git a/debian/changelog b/debian/changelog
index fc1eb4819..2b51dd2d6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ikiwiki (2.67) UNRELEASED; urgency=low
+
+ * remove: Avoid $_ breakage. (Stupid, stupid perl.)
+
+ -- Joey Hess <joeyh@debian.org> Mon, 06 Oct 2008 16:07:50 -0400
+
ikiwiki (2.66) unstable; urgency=low
* recentchanges: Fix redirects to non-page files.