]> iEval git - html-element-library.git/blame - t/TestUtils.pm
fixed content_handler.t
[html-element-library.git] / t / TestUtils.pm
CommitLineData
67e78ff2 1package TestUtils;
2
3use HTML::PrettyPrinter;
4use FileHandle;
5use File::Slurp;
6
7require Exporter;
8@ISA=qw(Exporter);
9@EXPORT = qw(ptree html_dir);
10
11sub html_dir {
12 't/html/'
13}
14
15sub ptree {
16 my $tree = shift or die 'must supply tree';
17 my $out = shift or die 'must supply outfile';
18
19 my $hpp = HTML::PrettyPrinter->new
20 (tabify => 0, allow_forced_nl => 1, quote_attr => 1);
21 my $lines = $hpp->format($tree);
22
23 write_file $out, @$lines;
24 join '', @$lines;
25}
26
27
28
291;
This page took 0.022197 seconds and 4 git commands to generate.