diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-23 06:51:15 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-23 06:51:15 +0000 |
commit | 6c8cf5dd571662f981227489f7c4652a1a1f10cd (patch) | |
tree | 778453ccf0d85720f37579f6e3c95624fdb5f960 /IkiWiki/Setup.pm | |
parent | 7b0346bf8234100f608aa7f24684becc952e8956 (diff) |
Major code reoganisation, splitting up the single big file. The two goals
kept in mind during this are a) to reduce load time for common cases like
cgi and post-commit and b) make the code easier to navigate.
This also modularises RCS support to the extent that it should be possible
to drop in a module for some RCS other than svn, add a switch for it, and
it pretty much just work.
High chance I missed an edge case that breaks something, this is only
barely tested at this point.
Diffstat (limited to 'IkiWiki/Setup.pm')
-rw-r--r-- | IkiWiki/Setup.pm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm new file mode 100644 index 000000000..63659ce2e --- /dev/null +++ b/IkiWiki/Setup.pm @@ -0,0 +1,22 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +package IkiWiki; + +sub setup () { # {{{ + my $setup=possibly_foolish_untaint($config{setup}); + delete $config{setup}; + open (IN, $setup) || error("read $setup: $!\n"); + local $/=undef; + my $code=<IN>; + ($code)=$code=~/(.*)/s; + close IN; + + eval $code; + error($@) if $@; + exit; +} #}}} + +1 |