+
+ my @ret;
+ foreach my $id (sort keys %{$IkiWiki::hooks{getsetup}}) {
+ # use an array rather than a hash, to preserve order
+ my @s=$IkiWiki::hooks{getsetup}{$id}{call}->();
+ return unless @s;
+ push @ret, "\t# $id plugin";
+ push @ret, dumpsetup(\%setup, @s);
+ push @ret, "";
+ }
+
+ if (%setup) {
+ push @ret, "\t# other";
+ foreach my $key (sort keys %setup) {
+ push @ret, dumpline($key, $setup{$key}, "");
+ }
+ }
+
+ unshift @ret, "#!/usr/bin/perl