]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Setup.pm
shorten further
[git.ikiwiki.info.git] / IkiWiki / Setup.pm
index 63659ce2e03e7147be14063bf13e24278ddab94f..9f210dec896e136c8f9536348fa07626fdda2c9d 100644 (file)
@@ -2,6 +2,7 @@
 
 use warnings;
 use strict;
 
 use warnings;
 use strict;
+use IkiWiki;
 
 package IkiWiki;
 
 
 package IkiWiki;
 
@@ -9,13 +10,17 @@ sub setup () { # {{{
        my $setup=possibly_foolish_untaint($config{setup});
        delete $config{setup};
        open (IN, $setup) || error("read $setup: $!\n");
        my $setup=possibly_foolish_untaint($config{setup});
        delete $config{setup};
        open (IN, $setup) || error("read $setup: $!\n");
-       local $/=undef;
-       my $code=<IN>;
+       my $code;
+       {
+               local $/=undef;
+               $code=<IN>;
+       }
        ($code)=$code=~/(.*)/s;
        close IN;
 
        eval $code;
        error($@) if $@;
        ($code)=$code=~/(.*)/s;
        close IN;
 
        eval $code;
        error($@) if $@;
+
        exit;
 } #}}}
 
        exit;
 } #}}}