]> sipb.mit.edu Git - ikiwiki.git/commitdiff
remove: Avoid $_ breakage. (Stupid, stupid perl.)
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 6 Oct 2008 20:10:47 +0000 (16:10 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 6 Oct 2008 20:10:47 +0000 (16:10 -0400)
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.

IkiWiki/Plugin/remove.pm
debian/changelog

index cf95026c871570358a00d9bc1027c9dc291d66ad..68bf9d1ee27ba570736a3e424e9bca973433149e 100644 (file)
@@ -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.
index fc1eb4819b857214cff0b4760236f143a15b14a8..2b51dd2d6b79a2b0a2851ed9d4f495337205a6f1 100644 (file)
@@ -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.