]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
avoid $_ in a few other for loops
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 6 Oct 2008 20:19:54 +0000 (16:19 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 6 Oct 2008 20:19:54 +0000 (16:19 -0400)
These were probably not currently buggy, but let's avoid bugs being
introduced by the functions called clobbering $_.

IkiWiki/Plugin/autoindex.pm
IkiWiki/Plugin/goodstuff.pm

index a79a06314900e42346e0cb4972e778a7b35df930..d1b3edb1f3cb6394d6bda558aed507fee627b4c3 100644 (file)
@@ -97,7 +97,9 @@ sub refresh () { #{{{
                if ($config{rcs}) {
                        IkiWiki::disable_commit_hook();
                }
-               genindex($_) foreach @needed;
+               foreach my $page (@needed) {
+                       genindex($page);
+               }
                if ($config{rcs}) {
                        IkiWiki::rcs_commit_staged(
                                gettext("automatic index generation"),
index 08ed960b4a3ff8bc7d10419e765a7bd3b4fbc8f0..ed1f4ddfc6cab5d88604be3fbe409ba3a573f642 100644 (file)
@@ -27,7 +27,9 @@ my @bundle=qw{
 
 sub import { #{{{
        hook(type => "getsetup", id => "goodstuff", call => \&getsetup);
-       IkiWiki::loadplugin($_) foreach @bundle;
+       foreach my $plugin (@bundle) {
+               IkiWiki::loadplugin($plugin);
+       }
 } # }}}
 
 sub getsetup { #{{{