aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2008-12-29 15:08:18 -0500
committerJoey Hess <joey@gnu.kitenet.net>2008-12-29 15:08:18 -0500
commitf34dc3d8bdfce58a628c8af75f3f3e09b604b1aa (patch)
treef8ff1912d0129989273097cd9f662f691034c1ab /IkiWiki
parent0711c0c548ce1a345b4e3456e2e31be6e27ab339 (diff)
downloadikiwiki-f34dc3d8bdfce58a628c8af75f3f3e09b604b1aa.tar
ikiwiki-f34dc3d8bdfce58a628c8af75f3f3e09b604b1aa.tar.gz
htmlbalance: Demand-load HTML::TreeBuilder to avoid failing test suite if it is not present.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/htmlbalance.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/htmlbalance.pm b/IkiWiki/Plugin/htmlbalance.pm
index 261e273aa..26f8e494b 100644
--- a/IkiWiki/Plugin/htmlbalance.pm
+++ b/IkiWiki/Plugin/htmlbalance.pm
@@ -10,7 +10,6 @@ package IkiWiki::Plugin::htmlbalance;
use warnings;
use strict;
use IkiWiki 3.00;
-use HTML::TreeBuilder;
use HTML::Entities;
sub import {
@@ -30,6 +29,8 @@ sub sanitize (@) {
my %params=@_;
my $ret = '';
+ eval q{use HTML::TreeBuilder};
+ error $@ if $@;
my $tree = HTML::TreeBuilder->new();
$tree->ignore_unknown(0);
$tree->ignore_ignorable_whitespace(0);