Form-Factory
view release on metacpan or search on metacpan
lib/Form/Factory/Control/Choice.pm view on Meta::CPAN
label => 'Baz',
value => 'baz',
);
my $qux = Form::Factory::Control::Choice->new({
label => 'Qux',
value => 'qux',
});
=head1 DESCRIPTION
These objects represent a single choice for a list or popup box. Each choice has a label and a value. The constructor is flexible to allow the following uses:
my $choice = Form::Factory::Control::Choice->new($value) # $label = $value
my $choice = Form::Factory::Control::Choice->new($value => $label);
my $choice = Form::Factory::Control::Choice->new(
label => $label,
value => $value,
);
my $choice = Form::Factory::Control::Choice->new({
label => $label,
value => $value,
lib/Form/Factory/Control/SelectOne.pm view on Meta::CPAN
=head1 NAME
Form::Factory::Control::SelectOne - A control for selecting a single item
=head1 VERSION
version 0.022
=head1 SYNOPSIS
has_control popup_menu => (
control => 'select_one',
options => {
available_choices => [
Form::Factory::Control::Choice->new('one'),
Form::Factory::Control::Choice->new('two'),
Form::Factory::Control::Choice->new('three'),
],
default_value => 'two',
},
);
( run in 1.911 second using v1.01-cache-2.11-cpan-364913b4093 )