Debian::Copyright::Stanza::OrSeparated(3pm)

Debian::Copyright::Stanza::OrSeparated3pm

'or' separated field abstraction

Usage

    my $f = Debian::Copyright::Stanza::OrSeparated->new('Artistic');
    $f->add('GPL-1+ or BSD');
    print $f->as_string;
        # 'Artistic or GPL-1+ or BSD'
    print "$f";     # the same
    $f->sort;

Version

This document describes Debian::Copyright::Stanza::OrSeparated version 0.2 .

Overview

Debian::Copyright::Stanza::OrSeparated abstracts handling of the License fields in Files blocks, which are lists separated by 'or'. It also supports a body field representing the optional extended description of a License field.

Constructor

new (initial values)

The initial values list is parsed and may contain strings that are in fact 'or'-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 " or ". The same function is used for overloading the stringification operation.

equals

Natural implementation of the equality function.

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

7 releases since Debian 7 (Wheezy); the text changed 3 times.

  1. 7
  2. 8
  3. 9–11
  4. 12–13

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