.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Dpkg::Changelog::Parse 3perl" .TH Dpkg::Changelog::Parse 3perl 2024-03-10 1.22.6 libdpkg-perl .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Dpkg::Changelog::Parse \- generic changelog parser for dpkg\-parsechangelog .SH DESCRIPTION .IX Header "DESCRIPTION" This module provides a set of functions which reproduce all the features of dpkg-parsechangelog. .SH FUNCTIONS .IX Header "FUNCTIONS" .ie n .IP "$fields = changelog_parse(%opt)" 4 .el .IP "\f(CW$fields\fR = changelog_parse(%opt)" 4 .IX Item "$fields = changelog_parse(%opt)" This function will parse a changelog. In list context, it returns as many Dpkg::Control objects as the parser did create. In scalar context, it will return only the first one. If the parser did not return any data, it will return an empty list in list context or undef on scalar context. If the parser failed, it will die. Any parse errors will be printed as warnings on standard error, but this can be disabled by passing \f(CW$opt\fR{verbose} to 0. .Sp The changelog file that is parsed is \fIdebian/changelog\fR by default but it can be overridden with \f(CW$opt\fR{file}. The changelog name used in output messages can be specified with \f(CW$opt\fR{label}, otherwise it will default to \f(CW$opt\fR{file}. The default output format is "dpkg" but it can be overridden with \f(CW$opt\fR{format}. .Sp The parsing itself is done by a parser module (searched in the standard perl library directories. That module is named according to the format that it is able to parse, with the name capitalized. By default it is either Dpkg::Changelog::Debian (from the "debian" format) or the format name looked up in the 40 last lines of the changelog itself (extracted with this perl regular expression "\eschangelog\-format:\es+([0\-9a\-z]+)\eW"). But it can be overridden with \f(CW$opt\fR{changelogformat}. .Sp If \f(CW$opt\fR{compression} is false, the file will be loaded without compression support, otherwise by default compression support is disabled if the file is the default. .Sp All the other keys in \f(CW%opt\fR are forwarded to the parser module constructor. .SH CHANGES .IX Header "CHANGES" .SS "Version 2.01 (dpkg 1.20.6)" .IX Subsection "Version 2.01 (dpkg 1.20.6)" New option: 'verbose' in \fBchangelog_parse()\fR. .SS "Version 2.00 (dpkg 1.20.0)" .IX Subsection "Version 2.00 (dpkg 1.20.0)" Remove functions: \fBchangelog_parse_debian()\fR, \fBchangelog_parse_plugin()\fR. .PP Remove warnings: For options 'forceplugin', 'libdir'. .SS "Version 1.03 (dpkg 1.19.0)" .IX Subsection "Version 1.03 (dpkg 1.19.0)" New option: 'compression' in \fBchangelog_parse()\fR. .SS "Version 1.02 (dpkg 1.18.8)" .IX Subsection "Version 1.02 (dpkg 1.18.8)" Deprecated functions: \fBchangelog_parse_debian()\fR, \fBchangelog_parse_plugin()\fR. .PP Obsolete options: forceplugin, libdir. .SS "Version 1.01 (dpkg 1.18.2)" .IX Subsection "Version 1.01 (dpkg 1.18.2)" New functions: \fBchangelog_parse_debian()\fR, \fBchangelog_parse_plugin()\fR. .SS "Version 1.00 (dpkg 1.15.6)" .IX Subsection "Version 1.00 (dpkg 1.15.6)" Mark the module as public.