]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/IkiWiki::Setup::load__40____41___broken_outside_ikiwiki__63__.mdwn
request for more detail
[ikiwiki.git] / doc / bugs / IkiWiki::Setup::load__40____41___broken_outside_ikiwiki__63__.mdwn
1 Hmm, according to the docs, shouldn't the following work?
2 <pre>
3 [ 74 ikipostal/test ]  ikiwiki --dumpsetup out.setup foo bar
4 [ 75 ikipostal/test ]  perl -MIkiWiki::Setup -e'IkiWiki::Setup::load("out.setup");'
5 out.setup: Can't use an undefined value as an ARRAY reference at /usr/share/perl5/IkiWiki/Setup.pm line 37.
6 BEGIN failed--compilation aborted at (eval 15) line 233.
7 </pre>
8
9 From looking at the code, it seems that a global hash %config should be 
10 initialized somehow.
11
12 This is in ikiwiki 2.62.1. I think this call used to work in 2.54 (when you first refactored the setup IIRC)
13
14 [[DavidBremner]]
15 >> Updated:
16 >> It seems that `%config = IkiWiki::defaultsetup();IkiWiki::Setup::load("file");`
17 >> works (after `use IkiWiki; use IkiWiki::Setup;`). Of course the other api 
18 >> is nicer.      
19
20 [[done]], sorry for trouble --[[Joey]]