.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" 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 2025-02-03 1.22.15-dirty 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(%opts)" 4 .el .IP "\f(CW$fields\fR = changelog_parse(%opts)" 4 .IX Item "$fields = changelog_parse(%opts)" 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$opts\fR{verbose} to 0. .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$opts\fR{changelogformat}. .Sp All the other keys in \f(CW%opts\fR are forwarded to the parser module constructor. .Sp Options: .RS 4 .IP \fBfile\fR 4 .IX Item "file" Set the changelog file to parse. Defaults to \fIdebian/changelog\fR. .IP \fBlabel\fR 4 .IX Item "label" Set the changelog name used in output messages. Defaults to \f(CW$opts\fR{file}. .IP \fBcompression\fR 4 .IX Item "compression" Set a boolean on whether to load the file without compression support. If the file is the default compression is disabled, otherwise the default is to enable compression. .IP \fBchangelogformat\fR 4 .IX Item "changelogformat" Set the changelog input format to use. .IP \fBformat\fR 4 .IX Item "format" Set the output format to use. Defaults to "dpkg". .IP \fBverbose\fR 4 .IX Item "verbose" Set whether to print any parse errors as warnings to standard error. Defaults to true. .RE .RS 4 .RE .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.