<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">commit 6ee59c2a16c978c641370f17537cc153159c4b64
Author: E. Choroba &lt;choroba@matfyz.cz&gt;
Date:   Wed Sep 30 02:32:16 2015 +0200

    Use Element::as_HTML instead of PrettyPrinter
    
    PrettyPrinter doesn't handle XML-style slashes in empty elements. It
    creates a new attribute from them, but the attributes are printed in
    random order in new versions of Perl, causing test failures. as_HTML
    prints attributes alphabetically sorted.

diff --git a/t/01-replacer.t b/t/01-replacer.t
index 19b2ba5..aad27d2 100644
--- a/t/01-replacer.t
+++ b/t/01-replacer.t
@@ -14,18 +14,23 @@ sub tage {
 
   my $tree = HTML::TreeBuilder-&gt;new_from_file("$root.initial")-&gt;guts;
 
-  my @data = ( { brand =&gt; 'schlitz', age =&gt; 'young' }, { brand =&gt; 'lowenbrau', age =&gt; 24 }, {brand =&gt;  'miller', age=&gt;17} );
+  my @data = ( { brand =&gt; 'schlitz', age =&gt; 'young' },
+               { brand =&gt; 'lowenbrau', age =&gt; 24 },
+               { brand =&gt; 'miller', age=&gt;17} );
 
   {
-  my $R = HTML::Element::Replacer-&gt;new(tree =&gt; $tree, look_down =&gt; [ scla =&gt; 'mid']);
+  my $R = HTML::Element::Replacer-&gt;new(tree =&gt; $tree,
+                                       look_down =&gt; [ scla =&gt; 'mid']);
   for my $data (@data) {
       $R-&gt;push_clone-&gt;defmap(kmap =&gt; $data);
   }
 }
 
-  my $generated_html = ptree($tree, "$root.gen");
+  my $generated_html = $tree-&gt;as_HTML;
 
-  is ($generated_html, File::Slurp::read_file("$root.exp"), "HTML");
+  is ($generated_html,
+      HTML::TreeBuilder-&gt;new_from_file("$root.exp")-&gt;guts-&gt;as_HTML,
+      'HTML');
 }
 
 
diff --git a/t/m/TestUtils.pm b/t/m/TestUtils.pm
index e5f2b69..dfd0a85 100644
--- a/t/m/TestUtils.pm
+++ b/t/m/TestUtils.pm
@@ -1,6 +1,5 @@
 package TestUtils;
 
-use HTML::PrettyPrinter;
 use FileHandle;
 use File::Slurp;
 
@@ -8,24 +7,10 @@ use Carp qw(carp cluck croak confess);
 
 require Exporter;
 @ISA=qw(Exporter);
-@EXPORT = qw(ptree html_dir);
+@EXPORT = qw(html_dir);
 
 sub html_dir {
   't/html/'
 }
 
-sub ptree {
-  my $tree = shift or confess 'must supply tree';
-  my $out = shift or confess 'must supply outfile';
-  
-  my $hpp = HTML::PrettyPrinter-&gt;new
-    (tabify =&gt; 0, allow_forced_nl =&gt; 1, quote_attr =&gt; 1);
-  my $lines = $hpp-&gt;format($tree);
-  
-  write_file $out, @$lines;
-  join '', @$lines;
-}
-
-
-
 1;
</pre></body></html>