1Dpkg::Changelog::Parse(3perl) libdpkg-perl Dpkg::Changelog::Parse(3perl)
2
3
4
6 Dpkg::Changelog::Parse - generic changelog parser for
7 dpkg-parsechangelog
8
10 This module provides a set of functions which reproduce all the
11 features of dpkg-parsechangelog.
12
14 $fields = changelog_parse(%opt)
15 This function will parse a changelog. In list context, it returns
16 as many Dpkg::Control objects as the parser did create. In scalar
17 context, it will return only the first one. If the parser did not
18 return any data, it will return an empty list in list context or
19 undef on scalar context. If the parser failed, it will die. Any
20 parse errors will be printed as warnings on standard error, but
21 this can be disabled by passing $opt{verbose} to 0.
22
23 The changelog file that is parsed is debian/changelog by default
24 but it can be overridden with $opt{file}. The changelog name used
25 in output messages can be specified with $opt{label}, otherwise it
26 will default to $opt{file}. The default output format is "dpkg"
27 but it can be overridden with $opt{format}.
28
29 The parsing itself is done by a parser module (searched in the
30 standard perl library directories. That module is named according
31 to the format that it is able to parse, with the name capitalized.
32 By default it is either Dpkg::Changelog::Debian (from the "debian"
33 format) or the format name looked up in the 40 last lines of the
34 changelog itself (extracted with this perl regular expression
35 "\schangelog-format:\s+([0-9a-z]+)\W"). But it can be overridden
36 with $opt{changelogformat}.
37
38 If $opt{compression} is false, the file will be loaded without
39 compression support, otherwise by default compression support is
40 disabled if the file is the default.
41
42 All the other keys in %opt are forwarded to the parser module
43 constructor.
44
46 Version 2.01 (dpkg 1.20.6)
47 New option: 'verbose' in changelog_parse().
48
49 Version 2.00 (dpkg 1.20.0)
50 Remove functions: changelog_parse_debian(), changelog_parse_plugin().
51
52 Remove warnings: For options 'forceplugin', 'libdir'.
53
54 Version 1.03 (dpkg 1.19.0)
55 New option: 'compression' in changelog_parse().
56
57 Version 1.02 (dpkg 1.18.8)
58 Deprecated functions: changelog_parse_debian(),
59 changelog_parse_plugin().
60
61 Obsolete options: forceplugin, libdir.
62
63 Version 1.01 (dpkg 1.18.2)
64 New functions: changelog_parse_debian(), changelog_parse_plugin().
65
66 Version 1.00 (dpkg 1.15.6)
67 Mark the module as public.
68
69
70
711.21.21 2023-07-19 Dpkg::Changelog::Parse(3perl)