X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/522daa7ea8111482701ce222800096edaf8eb2d2..d23ecdea299ddfc5ff12c76dc619bb2b1557d16b:/IkiWiki/Setup/Standard.pm?ds=inline diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index 9c177e497..ea7d763bb 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -1,6 +1,4 @@ #!/usr/bin/perl -# Standard ikiwiki setup module. -# Parameters to import should be all the standard ikiwiki config stuff. package IkiWiki::Setup::Standard; @@ -8,24 +6,23 @@ use warnings; use strict; use IkiWiki; +# Parameters to import should be all the standard ikiwiki config, in a hash. 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.", + my $thisperl = eval q{use Config; $Config{perlpath}}; + error($@) if $@; + + "#!$thisperl", "#", - "# Remember to re-run ikiwiki --setup any time you edit this file.", + (map { "# $_" } @_), "use IkiWiki::Setup::Standard {", - IkiWiki::Setup::commented_dump(\&dumpline), - "}"; + IkiWiki::Setup::commented_dump(\&dumpline, "\t"), + "}" } sub dumpline ($$$$) {