From 3166479fe4b170bf6ffd3f06c1422f65f7bbfe7e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 24 Mar 2010 14:53:32 -0400 Subject: [PATCH] fall back from YAML::Any to just YAML for portabilty to old YAML in Debian stable that lacks the former. --- IkiWiki/Setup/Yaml.pm | 2 ++ ikiwiki.in | 1 + 2 files changed, 3 insertions(+) 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); }, -- 2.26.2