aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-03-19 15:55:10 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-03-19 15:55:10 -0400
commit07bb08d0944a0282d6ed332deeefe347bc88139c (patch)
treea202244aa6584a4bd2f7800002b8dfe142cc6700
parentbba513a3e52170dc06b545a44f2d859ae4b757b5 (diff)
downloadikiwiki-07bb08d0944a0282d6ed332deeefe347bc88139c.tar
ikiwiki-07bb08d0944a0282d6ed332deeefe347bc88139c.tar.gz
shorten setuptype
-rw-r--r--IkiWiki.pm2
-rw-r--r--IkiWiki/Setup.pm10
2 files changed, 6 insertions, 6 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 241fb45b7..022bfe3bd 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -469,7 +469,7 @@ sub getsetup () {
},
setuptype => {
type => "internal",
- default => "IkiWiki::Setup::Standard",
+ default => "Standard",
description => "perl class to use to dump setup file",
safe => 0,
rebuild => 0,
diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm
index a71a12d9d..2cf01ea68 100644
--- a/IkiWiki/Setup.pm
+++ b/IkiWiki/Setup.pm
@@ -28,7 +28,7 @@ sub load ($;$) {
}
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)
@@ -37,9 +37,9 @@ sub load ($;$) {
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 {
@@ -50,9 +50,9 @@ sub load ($;$) {
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",