ikiwiki/IkiWiki/Setup.pm

31 lines
540 B
Perl
Raw Normal View History

#!/usr/bin/perl
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};
2007-01-04 13:00:23 +01:00
#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, $!));
2006-03-24 03:42:19 +01:00
my $code;
{
local $/=undef;
$code=<IN>;
}
($code)=$code=~/(.*)/s;
close IN;
eval $code;
error($@) if $@;
exit;
} #}}}
1