.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Dpkg::Control 3" .TH Dpkg::Control 3 "2018-06-26" "1.18.25" "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's the full list: .IP "\s-1CTRL_UNKNOWN\s0" 4 .IX Item "CTRL_UNKNOWN" This type is the default type, it indicates that the type of control information is not yet known. .IP "\s-1CTRL_INFO_SRC\s0" 4 .IX Item "CTRL_INFO_SRC" Corresponds to the first block of information in a \fIdebian/control\fR file in a Debian source package. .IP "\s-1CTRL_INFO_PKG\s0" 4 .IX Item "CTRL_INFO_PKG" Corresponds to subsequent blocks of information in a \fIdebian/control\fR file in a Debian source package. .IP "\s-1CTRL_REPO_RELEASE\s0" 4 .IX Item "CTRL_REPO_RELEASE" Corresponds to a \fIRelease\fR file in a repository. .IP "\s-1CTRL_INDEX_SRC\s0" 4 .IX Item "CTRL_INDEX_SRC" Corresponds to an entry in a \fISources\fR file of a source package repository. .IP "\s-1CTRL_INDEX_PKG\s0" 4 .IX Item "CTRL_INDEX_PKG" Corresponds to an entry in a \fIPackages\fR file of a binary package repository. .IP "\s-1CTRL_PKG_SRC\s0" 4 .IX Item "CTRL_PKG_SRC" Corresponds to a .dsc file of a Debian source package. .IP "\s-1CTRL_PKG_DEB\s0" 4 .IX Item "CTRL_PKG_DEB" Corresponds to the \fIcontrol\fR file generated by dpkg-gencontrol (\fIDEBIAN/control\fR) and to the same file inside .deb packages. .IP "\s-1CTRL_FILE_BUILDINFO\s0" 4 .IX Item "CTRL_FILE_BUILDINFO" Corresponds to a .buildinfo file. .IP "\s-1CTRL_FILE_CHANGES\s0" 4 .IX Item "CTRL_FILE_CHANGES" Corresponds to a .changes file. .IP "\s-1CTRL_FILE_VENDOR\s0" 4 .IX Item "CTRL_FILE_VENDOR" Corresponds to a vendor file in \f(CW$Dpkg::CONFDIR\fR/origins/. .IP "\s-1CTRL_FILE_STATUS\s0" 4 .IX Item "CTRL_FILE_STATUS" Corresponds to an entry in dpkg's \fIstatus\fR file ($Dpkg::ADMINDIR/status). .IP "\s-1CTRL_CHANGELOG\s0" 4 .IX Item "CTRL_CHANGELOG" Corresponds to the output of dpkg-parsechangelog. .IP "\s-1CTRL_COPYRIGHT_HEADER\s0" 4 .IX Item "CTRL_COPYRIGHT_HEADER" Corresponds to the header control block in a \fIdebian/copyright\fR file in machine readable format. .IP "\s-1CTRL_COPYRIGHT_FILES\s0" 4 .IX Item "CTRL_COPYRIGHT_FILES" Corresponds to a files control block in a \fIdebian/copyright\fR file in machine readable format. .IP "\s-1CTRL_COPYRIGHT_LICENSE\s0" 4 .IX Item "CTRL_COPYRIGHT_LICENSE" Corresponds to a license control block in a \fIdebian/copyright\fR file in machine readable format. .IP "\s-1CTRL_TESTS\s0" 4 .IX Item "CTRL_TESTS" Corresponds to a package tests control file in \fIdebian/tests/control\fR. .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 behaviour. .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)" If the \*(L"type\*(R" option is given, it's used to setup default values for other options. See \fIset_options()\fR for more details. .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. If the \*(L"type\*(R" option is changed, it is used first to define default values for others options. The option \&\*(L"allow_pgp\*(R" is set to 1 for \s-1CTRL_PKG_SRC, CTRL_FILE_CHANGES\s0 and \&\s-1CTRL_REPO_RELEASE\s0 and to 0 otherwise. The option \*(L"drop_empty\*(R" is set to 0 for \s-1CTRL_INFO_PKG\s0 and \s-1CTRL_INFO_SRC\s0 and to 1 otherwise. The option \*(L"name\*(R" is set to a textual description of the type of control information. .Sp The output order is also set to match the ordered list returned by Dpkg::Control::Fields::field_ordered_list($type). .ie n .IP "$c\->\fIget_type()\fR" 4 .el .IP "\f(CW$c\fR\->\fIget_type()\fR" 4 .IX Item "$c->get_type()" Returns the type of control information stored. See the type parameter set during \fInew()\fR. .SH "CHANGES" .IX Header "CHANGES" .SS "Version 1.03 (dpkg 1.18.11)" .IX Subsection "Version 1.03 (dpkg 1.18.11)" New type: \s-1CTRL_FILE_BUILDINFO.\s0 .SS "Version 1.02 (dpkg 1.18.8)" .IX Subsection "Version 1.02 (dpkg 1.18.8)" New type: \s-1CTRL_TESTS.\s0 .SS "Version 1.01 (dpkg 1.18.5)" .IX Subsection "Version 1.01 (dpkg 1.18.5)" New types: \s-1CTRL_REPO_RELEASE, CTRL_COPYRIGHT_HEADER, CTRL_COPYRIGHT_FILES, CTRL_COPYRIGHT_LICENSE.\s0 .SS "Version 1.00 (dpkg 1.15.6)" .IX Subsection "Version 1.00 (dpkg 1.15.6)" Mark the module as public.