]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Setup.pm
review of needstranslation() pagespec
[ikiwiki.git] / IkiWiki / Setup.pm
index 2cf01ea684e634da1b8bb4e0254256ca3507e59c..2b0259e2ac0e9b258d6537c48399547dba921e1d 100644 (file)
@@ -28,11 +28,12 @@ sub load ($;$) {
        }
        close IN;
 
-       if ($content=~/(use\s+)?IkiWiki::Setup::(\w+)/) {
+       if ($content=~/((?:use|require)\s+)?IkiWiki::Setup::(\w+)/) {
                $config{setuptype}=$2;
                if ($1) {
                        error sprintf(gettext("cannot load %s in safe mode"), $file)
                                if $safemode;
+                       no warnings;
                        eval IkiWiki::possibly_foolish_untaint($content);
                        error("$file: ".$@) if $@;
                }
@@ -122,7 +123,7 @@ sub getsetup () {
        # Load all plugins, so that all setup options are available.
        my @plugins=IkiWiki::listplugins();
        foreach my $plugin (@plugins) {
-               eval { IkiWiki::loadplugin($plugin) };
+               eval { IkiWiki::loadplugin($plugin, 1) };
                if (exists $IkiWiki::hooks{checkconfig}{$plugin}{call}) {
                        my @s=eval { $IkiWiki::hooks{checkconfig}{$plugin}{call}->() };
                }