Debian::Control::Stanza::CommaSeparated - comma separated debian/control field
my $f = Debian::Control::Stanza::CommaSeparated->new(
'Joe M <email@example.com>');
$f->add('"Smith, Agent" <firstname.lastname@example.org>, Joe M <email@example.com>');
# 'Joe M <firstname.lastname@example.org>, "Smith, Agent" <email@example.com>'
print "$f"; # the same
Debian::Control::Stanza::CommaSeparated abstracts handling of comma-separated
list of values, often found in debian/control file fields like
Uploaders. Note that the various dependency fields in
debian/control also use comma-separated values, but the
Debian::Dependencies class is more suitable for these as it is for example
also capable of finding overlapping dependency declarations.
- new (initial values)
- The initial values list is parsed and may contain strings that are in fact
comma-separated lists. These are split appropriately using
Text::ParseWords' quotewords routine.
- Returns text representation of the list. A simple join of the elements by
The same function is used for overloading the stringification
- add @items
- Adds the given items to the list. Items that are already present are not
added, keeping the list unique.
- A handy method for sorting the list.