Debian Codegraph @

README

raw
1 NAME
2 Debian::Copyright - manage Debian copyright files
3
4 VERSION
5 This document describes Debian::Copyright version 0.2 .
6
7 SYNOPSIS
8 my $c = Debian::Copyright->new(); # construct a new
9 $c->read($file1); # parse debian copyright file
10 $c->read($file2); # parse a second
11 $c->write($ofile); # write to file
12
13 DESCRIPTION
14 Debian::Copyright can be used for the representation, manipulation and
15 merging of Debian copyright files in an object-oriented way. It provides
16 easy reading and writing of the debian/copyright file found in Debian
17 source packages. Debian has recently started standardising its copyright
18 files around the machine-readable DEP-5/Format:
19 http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
20 format.
21
22 note on terminology
23 The term "Stanza" derives from the dh-make-perl tool. The official term
24 would now be "Paragraph". For the purposes of discussing the DEP-5
25 format the terms are used interchangeably in this documentation.
26
27 FIELDS
28 header
29 An instance of Debian::Copyright::Stanza::Header class. Contains the the
30 first stanza of the copyright file. If multiple files were parsed only
31 the first will be retained.
32
33 files
34 A hash reference (actually Tie::IxHash instance) with keys being the
35 values of the `Files' clause and values instances of
36 Debian::Copyright::Stanza::Files class.
37
38 licenses
39 A hash reference (actually Tie::IxHash instance) with keys being the
40 values of the `License' clause and values instances of
41 Debian::Copyright::Stanza::License class.
42
43 CONSTRUCTOR
44 new
45 Constructs a new Debian::Copyright instance.
46
47 The `header' field is initialised with an empty string. The
48 `files_block' and `license_block' fields are initialised with an empty
49 instance of Tie::IxHash.
50
51 METHODS
52 read *file*
53 Parse debian and accessors.
54
55 *file* can be either a file name, an opened file handle or a string
56 scalar reference.
57
58 write *file*
59 Writes a debian/copyright-like file in *file* with the contents defined
60 in the accessor fields.
61
62 *file* can be either a file name, an opened file handle or a string
63 scalar reference.
64
65 LIMITATIONS
66 This module is written with one particular version of DEP-5 in mind.
67 Furthermore version 0.1 of this software was for a draft version the
68 standard. The changes in going from draft to standard were such that it
69 was not worth attempting to maintain backwards compatibility.
70 Test coverage is not yet complete.
71
72 INCOMPATIBILITIES
73 This version is not backwards compatible with version 0.1.
74
75 ACKNOWLEDGEMENTS
76 Thanks to Charles Plessy for various comments regarding the
77 documentation.
78
79 COPYRIGHT & LICENSE
80 Copyright (C) 2011-2012 Nicholas Bamber [email protected]
81
82 This module was adapted from Debian::Control. Copyright (C) 2009 Damyan
83 Ivanov [email protected] [Portions]
84
85 This program is free software; you can redistribute it and/or modify it
86 under the terms of the GNU General Public License version 2 as published
87 by the Free Software Foundation.
88
89 This program is distributed in the hope that it will be useful, but
90 WITHOUT ANY WARRANTY; without even the implied warranty of
91 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
92