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"),
"}"
}
eval q{use Data::Dumper};
error($@) if $@;
+ no warnings 'once';
local $Data::Dumper::Terse=1;
local $Data::Dumper::Indent=1;
local $Data::Dumper::Pad="\t";
local $Data::Dumper::Quotekeys=0;
# only the perl version preserves utf-8 in output
local $Data::Dumper::Useperl=1;
+ use warnings;
my $dumpedvalue;
if (($type eq 'boolean' || $type eq 'integer') && $value=~/^[0-9]+$/) {