X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3b08789e6fb5809dd9b8f51f5c5e7df1d78e6930..a76206d4809364eaab288df45b126893887e46f4:/IkiWiki/Setup/Yaml.pm diff --git a/IkiWiki/Setup/Yaml.pm b/IkiWiki/Setup/Yaml.pm index c7ff1988e..8ad44eb4a 100644 --- a/IkiWiki/Setup/Yaml.pm +++ b/IkiWiki/Setup/Yaml.pm @@ -10,7 +10,8 @@ sub loaddump ($$) { my $class=shift; my $content=shift; - eval q{use YAML}; + eval q{use YAML::Any}; + eval q{use YAML} if $@; die $@ if $@; IkiWiki::Setup::merge(Load($content)); } @@ -18,7 +19,8 @@ sub loaddump ($$) { sub gendump ($@) { my $class=shift; - eval q{use YAML}; + eval q{use YAML::Any}; + eval q{use YAML} if $@; die $@ if $@; "# IkiWiki::Setup::Yaml - YAML formatted setup file", @@ -39,7 +41,7 @@ sub dumpline ($$$$) { my $dump=Dump({$key => $value}); chomp $dump; if (length $prefix) { - $dump=join("", map { $prefix.$_ } split(/\n/, $dump)); + $dump=join("\n", map { $prefix.$_ } split(/\n/, $dump)); } return $dump; }