.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (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 .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "Dpkg::Control 3perl" .TH Dpkg::Control 3perl 2026-03-06 1.23.7-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::Control \- parse and manipulate official control\-like information .SH DESCRIPTION .IX Header "DESCRIPTION" The Dpkg::Control object is a smart version of Dpkg::Control::Hash. It associates a type to the control information. That type can be used to know what fields are allowed and in what order they must be output. .PP The types are constants that are exported by default. Here\*(Aqs the full list: .IP CTRL_UNKNOWN 4 .IX Item "CTRL_UNKNOWN" This type is the default type, it indicates that the type of control information is not yet known. .IP CTRL_TMPL_SRC 4 .IX Item "CTRL_TMPL_SRC" Corresponds to the first source package stanza in a \fIdebian/control\fR file in a Debian source package. .IP CTRL_TMPL_PKG 4 .IX Item "CTRL_TMPL_PKG" Corresponds to subsequent binary package stanza in a \fIdebian/control\fR file in a Debian source package. .IP CTRL_REPO_RELEASE 4 .IX Item "CTRL_REPO_RELEASE" Corresponds to a \fIRelease\fR file in a repository. .IP CTRL_REPO_SRC 4 .IX Item "CTRL_REPO_SRC" Corresponds to a stanza in a \fISources\fR file of a source package repository. .IP CTRL_REPO_PKG 4 .IX Item "CTRL_REPO_PKG" Corresponds to a stanza in a \fIPackages\fR file of a binary package repository. .IP CTRL_DSC 4 .IX Item "CTRL_DSC" Corresponds to a .dsc file of a Debian source package. .IP CTRL_DEB 4 .IX Item "CTRL_DEB" Corresponds to the \fIcontrol\fR file generated by dpkg\-gencontrol (\fIDEBIAN/control\fR) and to the same file inside .deb packages. .IP CTRL_FILE_BUILDINFO 4 .IX Item "CTRL_FILE_BUILDINFO" Corresponds to a .buildinfo file. .IP CTRL_FILE_CHANGES 4 .IX Item "CTRL_FILE_CHANGES" Corresponds to a .changes file. .IP CTRL_FILE_VENDOR 4 .IX Item "CTRL_FILE_VENDOR" Corresponds to a vendor file in \f(CW$Dpkg::CONFDIR\fR/origins/. .IP CTRL_FILE_STATUS 4 .IX Item "CTRL_FILE_STATUS" Corresponds to a stanza in dpkg\*(Aqs \fIstatus\fR file ($Dpkg::ADMINDIR/status). .IP CTRL_CHANGELOG 4 .IX Item "CTRL_CHANGELOG" Corresponds to the output of dpkg\-parsechangelog. .IP CTRL_COPYRIGHT_HEADER 4 .IX Item "CTRL_COPYRIGHT_HEADER" Corresponds to the header stanza in a \fIdebian/copyright\fR file in machine readable format. .IP CTRL_COPYRIGHT_FILES 4 .IX Item "CTRL_COPYRIGHT_FILES" Corresponds to a files stanza in a \fIdebian/copyright\fR file in machine readable format. .IP CTRL_COPYRIGHT_LICENSE 4 .IX Item "CTRL_COPYRIGHT_LICENSE" Corresponds to a license stanza in a \fIdebian/copyright\fR file in machine readable format. .IP CTRL_TESTS 4 .IX Item "CTRL_TESTS" Corresponds to a source package tests control file in \fIdebian/tests/control\fR. .IP CTRL_INFO_SRC 4 .IX Item "CTRL_INFO_SRC" Deprecated alias for CTRL_TMPL_SRC. .IP CTRL_INFO_PKG 4 .IX Item "CTRL_INFO_PKG" Deprecated alias for CTRL_TMPL_PKG. .IP CTRL_PKG_SRC 4 .IX Item "CTRL_PKG_SRC" Deprecated alias for CTRL_DSC. .IP CTRL_PKG_DEB 4 .IX Item "CTRL_PKG_DEB" Deprecated alias for CTRL_DEB. .IP CTRL_INDEX_SRC 4 .IX Item "CTRL_INDEX_SRC" Deprecated alias for CTRL_REPO_SRC. .IP CTRL_INDEX_PKG 4 .IX Item "CTRL_INDEX_PKG" Deprecated alias for CTRL_REPO_PKG. .SH METHODS .IX Header "METHODS" All the methods of Dpkg::Control::Hash are available. Those listed below are either new or overridden with a different behavior. .ie n .IP "$c = Dpkg::Control\->new(%opts)" 4 .el .IP "\f(CW$c\fR = Dpkg::Control\->new(%opts)" 4 .IX Item "$c = Dpkg::Control->new(%opts)" Create a new deb822 control object. .Sp Options: .RS 4 .IP \fBtype\fR 4 .IX Item "type" Set the deb822 control type, used to setup default values for other options. .RE .RS 4 .Sp See \fBset_options()\fR for more details. .RE .ie n .IP $c\->set_options(%opts) 4 .el .IP \f(CW$c\fR\->set_options(%opts) 4 .IX Item "$c->set_options(%opts)" Changes the value of one or more options. .Sp Options: .RS 4 .IP \fBtype\fR 4 .IX Item "type" Sets the deb822 control object type, used to define default values for others options. .Sp The output order is also set to match the ordered list returned by Dpkg::Control::Fields::field_ordered_list($type). .IP \fBname\fR 4 .IX Item "name" Sets a textual description of the type of control information. .IP \fBallow_pgp\fR 4 .IX Item "allow_pgp" Sets whether the parser accepts OpenPGP signatures around the deb822 control information. .Sp By default it is set to 1 for CTRL_DSC, CTRL_FILE_CHANGES and CTRL_REPO_RELEASE and to 0 otherwise. .IP \fBallow_duplicate\fR 4 .IX Item "allow_duplicate" Sets whether the parser allows duplicate fields in deb822 control information. .IP \fBkeep_duplicate\fR 4 .IX Item "keep_duplicate" Sets whether the parser will keep values for duplicate fields found in deb822 control information (when \fBallow_duplicate\fR is enabled), as array references. .IP \fBdrop_empty\fR 4 .IX Item "drop_empty" Sets whether empty fields are dropped during output. .Sp By default it is set to 0 for CTRL_TMPL_SRC and CTRL_TMPL_PKG and to 1 otherwise. .RE .RS 4 .RE .ie n .IP $c\->\fBget_type()\fR 4 .el .IP \f(CW$c\fR\->\fBget_type()\fR 4 .IX Item "$c->get_type()" Returns the type of control information stored. See the type parameter set during \fBnew()\fR. .SH CHANGES .IX Header "CHANGES" .SS "Version 1.05 (dpkg 1.22.12)" .IX Subsection "Version 1.05 (dpkg 1.22.12)" Deprecate types: CTRL_INFO_SRC, CTRL_INFO_PKG, CTRL_PKG_SRC, CTRL_PKG_DEB, CTRL_INDEX_SRC, CTRL_INDEX_PKG. .SS "Version 1.04 (dpkg 1.22.2)" .IX Subsection "Version 1.04 (dpkg 1.22.2)" New types: CTRL_TMPL_SRC, CTRL_TMPL_PKG, CTRL_REPO_SRC, CTRL_REPO_PKG, CTRL_DSC, CTRL_DEB. .SS "Version 1.03 (dpkg 1.18.11)" .IX Subsection "Version 1.03 (dpkg 1.18.11)" New type: CTRL_FILE_BUILDINFO. .SS "Version 1.02 (dpkg 1.18.8)" .IX Subsection "Version 1.02 (dpkg 1.18.8)" New type: CTRL_TESTS. .SS "Version 1.01 (dpkg 1.18.5)" .IX Subsection "Version 1.01 (dpkg 1.18.5)" New types: CTRL_REPO_RELEASE, CTRL_COPYRIGHT_HEADER, CTRL_COPYRIGHT_FILES, CTRL_COPYRIGHT_LICENSE. .SS "Version 1.00 (dpkg 1.15.6)" .IX Subsection "Version 1.00 (dpkg 1.15.6)" Mark the module as public.