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