Debian::Control::Stanza::CommaSeparated(3pm)

Debian::Control::Stanza::CommaSeparated3pm

Comma separated debian/control field abstraction

Usage

    my $f = Debian::Control::Stanza::CommaSeparated->new(
        'Joe M <[email protected]>');
    $f->add('"Smith, Agent" <[email protected]>, Joe M <[email protected]>');
    print $f->as_string;
        # 'Joe M <[email protected]>, "Smith, Agent" <[email protected]>'
    print "$f";     # the same
    $f->sort;

Overview

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.

Constructor

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.

Methods

as_string

Returns text representation of the list. A simple join of the elements by ", ".

The same function is used for overloading the stringification operation.

add @items

Adds the given items to the list. Items that are already present are not added, keeping the list unique.

sort

A handy method for sorting the list.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

From libdebian-source-perl 0.128 in Debian 13 (Trixie). Parsed by carta from the page's man source.