1 t/basewiki_brokenlinks.t was failing with the following error:
3 t/basewiki_brokenlinks.....Can't locate IkiWiki.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux
4 /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8
5 /usr/lib/perl5/site_perl /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/local/lib/site_perl) at ./ikiwiki.out line 9.
7 When ikiwiki.out is executed the 'blib/lib' directory isn't inherited by the child process. I can add "use lib 'blib/lib'" to ikiwiki.out easily enough, but I can't figure out how to add it to ikiwiki.in so that pm_filter doesn't strip it out.
9 Anyway, once the 'use lib' is added I get the following error:
11 t/basewiki_brokenlinks.....ok 1/3Can't locate object method "new" via package "HTML::Template" at blib/lib/IkiWiki.pm line 858.
13 After some digging I found that HTML::Template is being required after the new statement, again, easily fixed:
16 ===================================================================
17 --- IkiWiki.pm (revision 3724)
18 +++ IkiWiki.pm (working copy)
23 - require HTML::Template;
31 + require HTML::Template;
32 HTML::Template->new(template_params(@_));
37 t/basewiki_brokenlinks.....ok 1/3HTML::Template->new called with multiple (or no) template sources specified! A valid call to new() has exactly one filename => 'file' OR exactly one scalarref => \$scalar OR exactly one arrayref => \@array OR exactly one filehandle => *FH at blib/lib/IkiWiki.pm line 858
39 After some step through I figured out that the template directory was invalid, again easily fixed:
41 Index: t/basewiki_brokenlinks.t
42 ===================================================================
43 --- t/basewiki_brokenlinks.t (revision 3724)
44 +++ t/basewiki_brokenlinks.t (working copy)
46 use Test::More tests => 3;
48 ok(! system("make ikiwiki.out"));
49 -ok(! system("PERL5LIB=. ./ikiwiki.out -plugin brokenlinks -rebuild -underlaydir=basewiki t/basewiki_brokenlinks t/basewiki_brokenlinks/out"));
50 +ok(! system("PERL5LIB=. ./ikiwiki.out -plugin brokenlinks -rebuild -underlaydir=basewiki -templatedir=templates t/basewiki_brokenlinks t/basewiki_brokenlinks/out"));
51 ok(`grep 'no broken links' t/basewiki_brokenlinks/out/index.html`);
52 system("rm -rf t/basewiki_brokenlinks/out t/basewiki_brokenlinks/.ikiwiki");
54 Other than ikiwiki.in, am I missing something here?
56 >> I think this is [[!debbug 425891]]. I have sent there a patch that incorporates the original
57 >> author's two diffs but has a more correct solution to the first problem described
58 >> above. -- Thomas, 2007-06-26