},
setuptype => {
type => "internal",
- default => "IkiWiki::Setup::Standard",
+ default => "Standard",
description => "perl class to use to dump setup file",
safe => 0,
rebuild => 0,
}
close IN;
- if ($content=~/(use\s+)?(IkiWiki::Setup::\w+)/) {
+ if ($content=~/(use\s+)?IkiWiki::Setup::(\w+)/) {
$config{setuptype}=$2;
if ($1) {
error sprintf(gettext("cannot load %s in safe mode"), $file)
error("$file: ".$@) if $@;
}
else {
- eval qq{require $config{setuptype}};
+ eval qq{require IkiWiki::Setup::$config{setuptype}};
error $@ if $@;
- $config{setuptype}->loaddump(IkiWiki::possibly_foolish_untaint($content));
+ "IkiWiki::Setup::$config{setuptype}"->loaddump(IkiWiki::possibly_foolish_untaint($content));
}
}
else {
sub dump ($) {
my $file=IkiWiki::possibly_foolish_untaint(shift);
- eval qq{require $config{setuptype}};
+ eval qq{require IkiWiki::Setup::$config{setuptype}};
error $@ if $@;
- my @dump=$config{setuptype}->gendump(
+ my @dump="IkiWiki::Setup::$config{setuptype}"->gendump(
"Setup file for ikiwiki.",
"",
"Passing this to ikiwiki --setup will make ikiwiki generate",