aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Setup.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-03-04 13:19:05 -0400
committerJoey Hess <joey@kitenet.net>2013-03-04 13:19:05 -0400
commit8c8aa3fe479ccbcc60d82b1efa38df2edf38fc15 (patch)
tree0f107c0361acc83b3681d06335a3d5f2744b93df /IkiWiki/Setup.pm
parent1d6eb13e2b3b7cf60f26ae4c5b631b0e65e34c5f (diff)
downloadikiwiki-8c8aa3fe479ccbcc60d82b1efa38df2edf38fc15.tar
ikiwiki-8c8aa3fe479ccbcc60d82b1efa38df2edf38fc15.tar.gz
Detect plugins with a broken getsetup and warn.
Diffstat (limited to 'IkiWiki/Setup.pm')
-rw-r--r--IkiWiki/Setup.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm
index 881e8a9d5..453d19670 100644
--- a/IkiWiki/Setup.pm
+++ b/IkiWiki/Setup.pm
@@ -172,6 +172,11 @@ sub getsetup () {
my @s=eval { $IkiWiki::hooks{getsetup}{$plugin}{call}->() };
next unless @s;
+ if (scalar(@s) % 2 != 0) {
+ print STDERR "warning: plugin $plugin has a broken getsetup; ignoring\n";
+ next;
+ }
+
# set default section value (note use of shared
# hashref between array and hash)
my %s=@s;