X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/77ba8aa7b7721c2da1bb3184a3e26fac6dc12ab1..767eb382046a707e78a975def60b93eb9244f5c6:/ikiwiki.in diff --git a/ikiwiki.in b/ikiwiki.in index adff1411e..30df628b2 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -1,14 +1,15 @@ #!/usr/bin/perl package IkiWiki; +no lib '.'; use warnings; use strict; -use lib '.'; # For use in nonstandard directory, munged by Makefile. +use FindBin; use lib $FindBin::Bin; # For use in nonstandard directory, munged by Makefile. use IkiWiki 3.00; sub usage () { die gettext("usage: ikiwiki [options] source dest"), "\n", - gettext(" ikiwiki --setup configfile"), "\n"; + gettext(" ikiwiki --setup my.setup [options]"), "\n"; } sub setup (@) { @@ -108,11 +109,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";