use strict; use warnings; use Test::More tests => 3; use HTML::FormFu; my $form = HTML::FormFu->new({ tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } }); my $field = $form->element('Select')->name('foo') ->options( [ [ 1 => 'One' ], [ 2 => 'Two' ] ] ); # add more elements to test accessor output $form->element('Select')->name('foo2')->options( [ { label => 'Ein', value => 1 }, { label => 'Zwei', value => 2, attributes => { class => 'foobar' } }, ] ); $form->element('Select')->name('bar')->values( [qw/ one two three /] ) ->value('two')->label('Bar')->attrs( { id => 'bar' } ); my $field_xhtml = qq{