Debian::Copyright::Stanza::OrSeparated - 'or' separated field abstraction
This document describes Debian::Copyright::Stanza::OrSeparated version 0.1 .
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;
Debian::Copyright::Stanza::OrSeparated abstracts handling of the License fields in Files blocks, which are lists separated by 'or'.
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.
quotewords
Returns text representation of the list. A simple join of the elements by or . The same function is used for overloading the stringification operation.
or
Natural implementation of the equality function.
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.
To install Debian::Copyright, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Debian::Copyright
CPAN shell
perl -MCPAN -e shell install Debian::Copyright
For more information on module installation, please visit the detailed CPAN module installation guide.