X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bbe1f2e493f009b49aba6ab83304f9484e37c61d..fab8bf80e068f5487b5e6f40cf92190fa6975221:/IkiWiki/Setup/Standard.pm?ds=sidebyside diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index 92e97c4b4..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,6 +6,7 @@ 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]); } @@ -15,11 +14,14 @@ sub import { sub gendump ($@) { my $class=shift; - "#!/usr/bin/perl", + my $thisperl = eval q{use Config; $Config{perlpath}}; + error($@) if $@; + + "#!$thisperl", "#", (map { "# $_" } @_), "use IkiWiki::Setup::Standard {", - IkiWiki::Setup::commented_dump(\&dumpline), + IkiWiki::Setup::commented_dump(\&dumpline, "\t"), "}" }