From: Joey Hess Date: Wed, 24 Mar 2010 18:53:32 +0000 (-0400) Subject: fall back from YAML::Any to just YAML X-Git-Tag: 3.20100403~111 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3166479fe4b170bf6ffd3f06c1422f65f7bbfe7e;p=ikiwiki.git fall back from YAML::Any to just YAML for portabilty to old YAML in Debian stable that lacks the former. --- 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); },