unshift @INC, possibly_foolish_untaint($config{libdir});
}
- loadplugin($_) foreach @{$config{default_plugins}}, @{$config{add_plugins}};
+ foreach my $plugin (@{$config{default_plugins}}, @{$config{add_plugins}}) {
+ loadplugin($plugin);
+ }
if ($config{rcs}) {
if (exists $IkiWiki::hooks{rcs}) {
* Typo. Closes: #497003
* Ignore failure to install files into /etc, in case install is running as
non-root.
+ * Work around perl $_ scoping nonsense that caused breakage when loading
+ external plugins.
-- Joey Hess <joeyh@debian.org> Thu, 28 Aug 2008 16:08:18 -0400
**patch comment:** solves the problem on 2.61. as these are the first lines of perl i've knowingly written, i can not explain what exactly was happening there.
+> Perl's `$_` handling is the worst wart on it, or possibly any language.
+> Here it's an alias to the actual value in the array, and when deep
+> in the external plugin load code something resets `$_` to a different
+> value, the alias remains and it changes the value at a distance.
+>
+> Thanks for the excellent problem report, [[fixed|done]]. --[[Joey]]
+
------------------------------------------------------------------------------
diff --git a/IkiWiki.pm b/IkiWiki.pm
index e476521..d43abd4 100644