]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
* Add getopt hook type, this allows plugins to add new command-line options.
[ikiwiki.git] / IkiWiki.pm
index 4964f97a1ad59797e34f745e8a9f01e50f73169d..2b877a370d7f37a95147d9a7eb6bdd92ca3d3095 100644 (file)
@@ -81,6 +81,14 @@ sub checkconfig () { #{{{
                require IkiWiki::Rcs::Stub;
        }
 
+       if (exists $hooks{checkconfig}) {
+                foreach my $id (keys %{$hooks{checkconfig}}) {
+                        $hooks{checkconfig}{$id}{call}->();
+                }
+        }
+} #}}}
+
+sub loadplugins () { #{{{
        foreach my $plugin (@{$config{plugin}}) {
                my $mod="IkiWiki::Plugin::".possibly_foolish_untaint($plugin);
                eval qq{use $mod};
@@ -88,12 +96,6 @@ sub checkconfig () { #{{{
                        error("Failed to load plugin $mod: $@");
                }
        }
-
-       if (exists $hooks{checkconfig}) {
-                foreach my $id (keys %{$hooks{checkconfig}}) {
-                        $hooks{checkconfig}{$id}{call}->();
-                }
-        }
 } #}}}
 
 sub error ($) { #{{{