use Test::More; use Test::XML; use Data::Dumper; plan tests => 3; require_ok( 'XHTML::Instrumented' ); my $data = < DATA my $cmp = < DATA my $t = XHTML::Instrumented->new(name => \$data, type => ''); my $output = $t->output( learn_list => $t->loop(), ); is_xml($output, $cmp, 'not defined'); $output = $t->output( learn_list => $t->loop( headers => [ 'nav_learn' ], data => [ [ $t->replace(text => 'English' . ' (' . 123 . ')', args => { href => 'http://test/1' }) ], [ $t->replace(text => 'French' . ' (' . 456 . ')', args => { href => 'http://test/2' }) ], ] ), ); $cmp = < DATA is_xml($output, $cmp, 'defined');