diff options
author | Joey Hess <joey@kitenet.net> | 2012-01-28 22:01:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-01-28 22:36:14 -0400 |
commit | 6c3cdb04ac1794d2b3fd24f7da4c9ec4aac05d11 (patch) | |
tree | d0f3614f89a3a8162eae96ffba816e6a1f52680d /ikiwiki.in | |
parent | e9c38d16fc587ccd5ab08166253afdc9363de65b (diff) | |
download | ikiwiki-6c3cdb04ac1794d2b3fd24f7da4c9ec4aac05d11.tar ikiwiki-6c3cdb04ac1794d2b3fd24f7da4c9ec4aac05d11.tar.gz |
Switch to YAML::XS to work around insanity in YAML::Mo. Closes: #657533
https://rt.cpan.org/Ticket/Display.html?id=74487
Gave up trying to support multiple YAML backends. The XS one requires ugly
manual encoding to get unicode right, and doesn't allow dumping yaml
fragments w/o the yaml header, but at least it doesn't randomly crash
on import like YAML::Mo has started to.
Diffstat (limited to 'ikiwiki.in')
-rwxr-xr-x | ikiwiki.in | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ikiwiki.in b/ikiwiki.in index adff1411e..e6b64f439 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -108,11 +108,9 @@ sub getconfig () { if (! defined $var || ! defined $val) { die gettext("usage: --set-yaml var=value"), "\n"; } - eval q{use YAML::Any}; - eval q{use YAML} if $@; + eval q{use YAML::XS; use Encode}; die $@ if $@; - eval q{$YAML::Syck::ImplicitUnicode=1}; - $config{$var}=Load($val."\n"); + $config{$var}=Load(encode_utf8($val)."\n"); }, "version" => sub { print "ikiwiki version $IkiWiki::version\n"; |