aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/IkiWiki::Setup::load__40____41___broken_outside_ikiwiki__63__.mdwn
blob: b92a96838b56ce4228eadeff8e0bf708532a5a34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Hmm, according to the docs, shouldn't the following work?
<pre>
[ 74 ikipostal/test ]  ikiwiki --dumpsetup out.setup foo bar
[ 75 ikipostal/test ]  perl -MIkiWiki::Setup -e'IkiWiki::Setup::load("out.setup");'
out.setup: Can't use an undefined value as an ARRAY reference at /usr/share/perl5/IkiWiki/Setup.pm line 37.
BEGIN failed--compilation aborted at (eval 15) line 233.
</pre>

From looking at the code, it seems that a global hash %config should be 
initialized somehow.

This is in ikiwiki 2.62.1. I think this call used to work in 2.54 (when you first refactored the setup IIRC)

[[DavidBremner]]
>> Updated:
>> It seems that `%config = IkiWiki::defaultsetup();IkiWiki::Setup::load("file");`
>> works (after `use IkiWiki; use IkiWiki::Setup;`). Of course the other api 
>> is nicer.