1Dpkg::Changelog::Parse(3) libdpkg-perl Dpkg::Changelog::Parse(3)
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_debian(%opt)
15 This function is deprecated, use changelog_parse() instead, with
16 the changelog format set to "debian".
17
18 $fields = changelog_parse_plugin(%opt)
19 This function is deprecated, use changelog_parse() instead.
20
21 $fields = changelog_parse(%opt)
22 This function will parse a changelog. In list context, it returns
23 as many Dpkg::Control objects as the parser did create. In scalar
24 context, it will return only the first one. If the parser did not
25 return any data, it will return an empty list in list context or
26 undef on scalar context. If the parser failed, it will die.
27
28 The changelog file that is parsed is debian/changelog by default
29 but it can be overridden with $opt{file}. The default output format
30 is "dpkg" but it can be overridden with $opt{format}.
31
32 The parsing itself is done by a parser module (searched in the
33 standard perl library directories. That module is named according
34 to the format that it is able to parse, with the name capitalized.
35 By default it is either Dpkg::Changelog::Debian (from the "debian"
36 format) or the format name looked up in the 40 last lines of the
37 changelog itself (extracted with this perl regular expression
38 "\schangelog-format:\s+([0-9a-z]+)\W"). But it can be overridden
39 with $opt{changelogformat}.
40
41 All the other keys in %opt are forwarded to the parser module
42 constructor.
43
45 Version 1.02 (dpkg 1.18.8)
46 Deprecated functions: changelog_parse_debian(),
47 changelog_parse_plugin().
48
49 Obsolete options: $forceplugin, $libdir.
50
51 Version 1.01 (dpkg 1.18.2)
52 New functions: changelog_parse_debian(), changelog_parse_plugin().
53
54 Version 1.00 (dpkg 1.15.6)
55 Mark the module as public.
56
57
58
591.18.25 2019-07-24 Dpkg::Changelog::Parse(3)