ScalarList - scalar list component property
use Podius::Property::ScalarList;
$l = new Podius::Property::ScalarList(['tic', 'tac']);
$l->push('toe');
print $l->as_string("(%s)"), "\n";
To write.
the Exception manpage, the Podius::Property manpage.
- description
-
Class constructor.
- returns
-
New formed property reference.
- description
-
Class constructor. Used for deserialization.
- parameters
-
Class name (like all constructors) and string, representing the property.
- returns
-
New formed property reference.
- description
-
Used for serialization.
- returns
-
String, representing the property, from which the property can be restored
later by new_from_serialized constructor.
- parameters
-
Accessor: none.
-
Modifier: property value to set, array ref.
- returns
-
The resulting property value, array ref (read only).
- description
-
Only accessor form is available.
-
This is an alias to as_string method.
- description
-
Only accessor form is available.
-
This is an alias to top method.
- description
-
Only modifier form is available.
-
This is an alias to push method.
- parameters
-
* scalar format (optional, default is '"%s"')
* delimiter (optional, default is ', ')
- returns
-
The string representation of this ScalarList.
- parameters
-
* a list of scalars to be pushed to the end of list
- returns
-
The resulting property value, array ref (read only).
- parameters
-
* the last element in the list or undef
- returns
-
Scalar.
- description
-
Adds rows to the scalar list.
- parameters
-
* number of rows to add
* optional scalar to initialize rows, "" by default
* optional boolean, if true, then add to the beggining not the end
- returns
-
Number of rows actually added, 0 on bad input.
- description
-
Delete certain rows from the scalar list.
- parameters
-
* number of rows to delete
* optional boolean, if true, then delete from the beggining not the end
* optional starting index (default 0)
- returns
-
Number of rows actually deleted, 0 on bad input.