X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6c8cf5dd571662f981227489f7c4652a1a1f10cd..19a7752021249eb8984e523fd6ed5a3730dc9be7:/IkiWiki/Setup.pm diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 63659ce2e..235e93eaf 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -2,20 +2,28 @@ use warnings; use strict; +use IkiWiki; +use open qw{:utf8 :std}; package IkiWiki; sub setup () { # {{{ my $setup=possibly_foolish_untaint($config{setup}); delete $config{setup}; - open (IN, $setup) || error("read $setup: $!\n"); - local $/=undef; - my $code=; + #translators: The first parameter is a filename, and the second + #translators: is a (probably not translated) error message. + open (IN, $setup) || error(sprintf(gettext("cannot read %s: %s"), $setup, $!)); + my $code; + { + local $/=undef; + $code=; + } ($code)=$code=~/(.*)/s; close IN; eval $code; - error($@) if $@; + error("$setup: ".$@) if $@; + exit; } #}}}