]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Setup.pm
Fix link from meta plugin to tips/howto_stop_flooding_aggregators
[git.ikiwiki.info.git] / IkiWiki / Setup.pm
index 778e1b495df26c14503fa0809ee10ce63d2fc292..2b76efc16b92bd471429f660df73d4d2f24b05e9 100644 (file)
@@ -1,13 +1,20 @@
 #!/usr/bin/perl
 #!/usr/bin/perl
+# Ikiwiki setup files are perl files that 'use IkiWiki::Setup::foo',
+# passing it some sort of configuration data.
+#
+# There can be multiple modules, with different configuration styles.
+# The setup modules each convert the data into the hashes used by ikiwiki
+# internally (if it's not already in that format), and store it in
+# IkiWiki::Setup::$raw_setup, to pass it back to this module.
 
 package IkiWiki::Setup;
 
 package IkiWiki::Setup;
+
 use warnings;
 use strict;
 use IkiWiki;
 use warnings;
 use strict;
 use IkiWiki;
+use IkiWiki::Wrapper;
 use open qw{:utf8 :std};
 
 use open qw{:utf8 :std};
 
-# This hashref is where setup files store settings while they're being
-# loaded. It is not used otherwise.
 our $raw_setup;
 
 sub load ($) { # {{{
 our $raw_setup;
 
 sub load ($) { # {{{
@@ -67,14 +74,14 @@ sub setup () { #{{{
                next if $c eq 'syslog';
                if (defined $setup{$c}) {
                        if (! ref $setup{$c}) {
                next if $c eq 'syslog';
                if (defined $setup{$c}) {
                        if (! ref $setup{$c}) {
-                               $config{$c}=IkiWiki::possibly_foolish_untaint($setup{$c});
+                               $config{$c}=possibly_foolish_untaint($setup{$c});
                        }
                        elsif (ref $setup{$c} eq 'ARRAY') {
                        }
                        elsif (ref $setup{$c} eq 'ARRAY') {
-                               $config{$c}=[map { IkiWiki::possibly_foolish_untaint($_) } @{$setup{$c}}]
+                               $config{$c}=[map { possibly_foolish_untaint($_) } @{$setup{$c}}]
                        }
                        elsif (ref $setup{$c} eq 'HASH') {
                                foreach my $key (keys %{$setup{$c}}) {
                        }
                        elsif (ref $setup{$c} eq 'HASH') {
                                foreach my $key (keys %{$setup{$c}}) {
-                                       $config{$c}{$key}=IkiWiki::possibly_foolish_untaint($setup{$c}{$key});
+                                       $config{$c}{$key}=possibly_foolish_untaint($setup{$c}{$key});
                                }
                        }
                }
                                }
                        }
                }