NAME
Mail::Builder::List - Helper module for handling various lists
SYNOPSIS
use Mail::Builder;
my $list = Mail::Builder::List->new(Mail::Builder::Address);
$list->add($address_object);
$list->add($another_address_object);
$list->reset;
$list->add($email,$name);
print $list->join(',');
DESCRIPTION
This is a simple module for handling various lists (e.g. recipient lists).
USAGE
new
Mail::Builder::List->new(CLASS);
This constructor takes the class name of the objects it should hold. It is only possible to add objects of the selected type.
type
Returns the class name which was initially passed to the constructor.
add
$list->add(OBJECT);
OR
$list->add(PARAM1,PARAM2,...,PARAMN)
This method appends a new item to the list. It can either take an object or an arbitrary number of parameters. The parameters will be passed to the constructor of the list type class. An exception is thrown if the object type and the list type do not match.
length
Returns the number of items in the list.
join([STRING])
Serializes all items in the list and joins them with the given string. If no string is provided then a semicolon is used.
reset
Removes all items from the list.
list
Returns all items in the list as an array.
item([INDEX])
Returns the item at the given index.
AUTHOR
Maroš Kollár
CPAN ID: MAROS
maros [at] k-1.com
http://www.k-1.com
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 193:
Non-ASCII character seen before =encoding in 'Maroš'. Assuming UTF-8