reopen 425891
found 425891 2.2
tag +patch
thanks

Hi Joey,

I'm afraid that the problem persists in 2.2.
The root cause seems to be that PERL5LIB set in t/basewiki_brokenlinks.t is ignored by ikiwiki.out due to the #!/usr/bin/perl -T in ikiwiki.out. Invoking the test as "perl -T -I. ./ikiwiki.out ..." helps for this, but the
other issues raised in
http://ikiwiki.info/bugs/tbasewiki__95__brokenlinks.t_broken/
also seem to still apply.

I have attached a patch which combines the invocation fix with the two
(sane-looking) fixes by the author of above bug report.

Thanks for developing ikiwiki!

Kind regards

T.
--
Thomas Viehmann, http://thomas.viehmann.net/
diff -urN orig/ikiwiki-2.2/IkiWiki.pm ikiwiki-2.2/IkiWiki.pm
--- orig/ikiwiki-2.2/IkiWiki.pm	2007-06-03 16:20:18.000000000 +0000
+++ ikiwiki-2.2/IkiWiki.pm	2007-06-26 12:28:09.000000000 +0000
@@ -842,7 +842,6 @@
 		return "";
 	}
 
-	require HTML::Template;
 	my @ret=(
 		filter => sub {
 			my $text_ref = shift;
@@ -857,6 +856,7 @@
 } #}}}
 
 sub template ($;@) { #{{{
+	require HTML::Template;
 	HTML::Template->new(template_params(@_));
 } #}}}
 
diff -urN orig/ikiwiki-2.2/t/basewiki_brokenlinks.t ikiwiki-2.2/t/basewiki_brokenlinks.t
--- orig/ikiwiki-2.2/t/basewiki_brokenlinks.t	2007-05-24 20:21:33.000000000 +0000
+++ ikiwiki-2.2/t/basewiki_brokenlinks.t	2007-06-26 12:31:06.000000000 +0000
@@ -4,6 +4,6 @@
 use Test::More tests => 3;
 
 ok(! system("make ikiwiki.out"));
-ok(! system("PERL5LIB=. ./ikiwiki.out -plugin brokenlinks -rebuild -underlaydir=basewiki t/basewiki_brokenlinks t/basewiki_brokenlinks/out"));
+ok(! system("perl -T -I. ./ikiwiki.out -plugin brokenlinks -rebuild -underlaydir=basewiki -templatedir=templates t/basewiki_brokenlinks t/basewiki_brokenlinks/out"));
 ok(`grep 'no broken links' t/basewiki_brokenlinks/out/index.html`);
 system("rm -rf t/basewiki_brokenlinks/out t/basewiki_brokenlinks/.ikiwiki");

Reply via email to