aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-03-19 15:35:21 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-03-19 15:35:21 -0400
commitbbe1f2e493f009b49aba6ab83304f9484e37c61d (patch)
tree2aaa636b8a2b48d7d2cf0c05ac3e7e119172e3ff
parent522daa7ea8111482701ce222800096edaf8eb2d2 (diff)
downloadikiwiki-bbe1f2e493f009b49aba6ab83304f9484e37c61d.tar
ikiwiki-bbe1f2e493f009b49aba6ab83304f9484e37c61d.tar.gz
move generic comment into IkiWiki::Setup
-rw-r--r--IkiWiki/Setup.pm9
-rw-r--r--IkiWiki/Setup/Standard.pm11
2 files changed, 11 insertions, 9 deletions
diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm
index 369ff44d0..45f263bc8 100644
--- a/IkiWiki/Setup.pm
+++ b/IkiWiki/Setup.pm
@@ -52,7 +52,14 @@ sub dump ($) {
eval qq{require $config{setuptype}};
error $@ if $@;
- my @dump=$config{setuptype}->gendump("Setup file for ikiwiki.");
+ my @dump=$config{setuptype}->gendump(
+ "Setup file for ikiwiki.",
+ "",
+ "Passing this to ikiwiki --setup will make ikiwiki generate",
+ "wrappers and build the wiki.",
+ "",
+ "Remember to re-run ikiwiki --setup any time you edit this file.",
+ );
open (OUT, ">", $file) || die "$file: $!";
print OUT "$_\n" foreach @dump;
diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm
index 9c177e497..92e97c4b4 100644
--- a/IkiWiki/Setup/Standard.pm
+++ b/IkiWiki/Setup/Standard.pm
@@ -12,20 +12,15 @@ sub import {
IkiWiki::Setup::merge($_[1]);
}
-sub gendump ($$) {
+sub gendump ($@) {
my $class=shift;
- my $description=shift;
"#!/usr/bin/perl",
- "# $description",
"#",
- "# Passing this to ikiwiki --setup will make ikiwiki generate",
- "# wrappers and build the wiki.",
- "#",
- "# Remember to re-run ikiwiki --setup any time you edit this file.",
+ (map { "# $_" } @_),
"use IkiWiki::Setup::Standard {",
IkiWiki::Setup::commented_dump(\&dumpline),
- "}";
+ "}"
}
sub dumpline ($$$$) {