1 # This might look like shell script, but it's actually -*- perl -*-
5 use Test::More qw(no_plan);
8 use HTML::Element::Library;
11 # this is a simpler call to iter2()
13 my $root = 't/html/dual_iter';
15 my $tree = HTML::TreeBuilder->new_from_file("$root.html");
17 my $dl = $tree->look_down(id => 'service_plan');
21 ['the pros' => 'never have to worry about service again'],
22 ['the cons' => 'upfront extra charge on purchase'],
23 ['our choice' => 'go with the extended service plan']
29 wrapper_data => \@items,
34 # only keep the last 2 dts and dds
35 my @content_list = $container->content_list;
36 $container->splice_content(0, @content_list - 2);
41 my ($container, @item_elems) = @_;
42 $container->unshift_content(@item_elems);
50 is_xml ($tree->as_XML, scalar File::Slurp::read_file("$root.exp"),
51 "XML for generated li");