use strict; use warnings; use Test::More; eval { require Template; }; if ($@) { plan skip_all => 'Template.pm required'; exit; } else { plan tests => 1; } use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->element('Text')->name('foo'); $form->element('Textarea')->name('bar'); my $template = Template->new; my $output; $template->process( \*DATA, { form => $form }, \$output ) or die $template->error; my $xhtml = <
EOF is( $output, $xhtml ); __DATA__ [% form.start %] [% form.end %]