]> sipb.mit.edu Git - ikiwiki.git/commitdiff
fall back from YAML::Any to just YAML
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 24 Mar 2010 18:53:32 +0000 (14:53 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 24 Mar 2010 18:53:32 +0000 (14:53 -0400)
for portabilty to old YAML in Debian stable that lacks the former.

IkiWiki/Setup/Yaml.pm
ikiwiki.in

index 58cba4222e95517248853991bc3ebaa4e808e1bd..8ad44eb4afab294114ad1dad17f21c915794904a 100644 (file)
@@ -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",
index 7028bdb7d99d098175ed772060946bfc24023a4c..a8343ed0f99bb1e44b98e7ba4757c48693a45376 100755 (executable)
@@ -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);
                        },