summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-03-24 14:53:32 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-03-24 14:53:32 -0400
commit3166479fe4b170bf6ffd3f06c1422f65f7bbfe7e (patch)
tree63de3e917bb00dd99fb41134e1629fad248c7036
parentc64c4b99626286ee08f67999a18c43c769e21e6a (diff)
fall back from YAML::Any to just YAML
for portabilty to old YAML in Debian stable that lacks the former.
-rw-r--r--IkiWiki/Setup/Yaml.pm2
-rwxr-xr-xikiwiki.in1
2 files changed, 3 insertions, 0 deletions
diff --git a/IkiWiki/Setup/Yaml.pm b/IkiWiki/Setup/Yaml.pm
index 58cba4222..8ad44eb4a 100644
--- a/IkiWiki/Setup/Yaml.pm
+++ b/IkiWiki/Setup/Yaml.pm
@@ -11,6 +11,7 @@ sub loaddump ($$) {
my $content=shift;
eval q{use YAML::Any};
+ eval q{use YAML} if $@;
die $@ if $@;
IkiWiki::Setup::merge(Load($content));
}
@@ -19,6 +20,7 @@ sub gendump ($@) {
my $class=shift;
eval q{use YAML::Any};
+ eval q{use YAML} if $@;
die $@ if $@;
"# IkiWiki::Setup::Yaml - YAML formatted setup file",
diff --git a/ikiwiki.in b/ikiwiki.in
index 7028bdb7d..a8343ed0f 100755
--- a/ikiwiki.in
+++ b/ikiwiki.in
@@ -102,6 +102,7 @@ sub getconfig () {
die gettext("usage: --set-yaml var=value"), "\n";
}
eval q{use YAML::Any};
+ eval q{use YAML} if $@;
die $@ if $@;
$config{$var}=Load($val);
},