Podius::Property::Selection - component property allowing single selection from multiple choices
$property = new Podius::Property::Selection;
Supposed to be used in the Podius::Component manpage and the Podius::Property manpage module trees only.
This module implements component property of multiple choices with single selection.
The selection is one code (scalar, often integer or short string) from list of possible codes.
If a constant array of choices is supplied in the class constructor, the label of this property is taken as a chosen code, when appropriate. If, instead, a constant code->label hash is supplied in the class constructor, it is used to translate from choice code to its label, when appropriate.
Note, access modifier method supposes to get a choice code as parameter,
not label; access accessor method returns a choice code, not label.
Use access_label instead. access_code is an alias to access.
the Exception manpage, the Podius::Property::Scalar manpage.
access method inherited from superclass
the Podius::Property::Scalar manpage, but choice label is used instead of
choice code (code is evaluated from its label).
Accessor: returns the currently selected choice label.
Modifier: sets a new selected choice label. If the given label is not found, no changes done.
Modifier: choice label (string).
Modifier: new selected choice code (scalar) or undef if the given label is not found.
Returns a list of all possible choice codes.
Returns a list of all possible choice labels.
Returns a hash of all possible choices: {code =>* label}.
Returns a value that is used to initialized this property.
Returns true if the selected option is initial, see also access_initial_code method.
access method.