.\" -*- 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::Source::Format 3perl" .TH Dpkg::Source::Format 3perl 2026-01-23 1.23.5-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::Source::Format \- manipulate debian/source/format files .SH DESCRIPTION .IX Header "DESCRIPTION" This module provides a class that can manipulate Debian source package \fIdebian/source/format\fR files. .SH METHODS .IX Header "METHODS" .ie n .IP "$f = Dpkg::Source::Format\->new(%opts)" 4 .el .IP "\f(CW$f\fR = Dpkg::Source::Format\->new(%opts)" 4 .IX Item "$f = Dpkg::Source::Format->new(%opts)" Creates a new object corresponding to a source package\*(Aqs \&\fIdebian/source/format\fR file. .Sp Options: .RS 4 .IP \fBfilename\fR 4 .IX Item "filename" Set the filename to use to parse and set the format. .IP \fBformat\fR 4 .IX Item "format" Set and validate the format to use instead of loading the default file, if no filename has been specified. .RE .RS 4 .RE .ie n .IP "$f\->set_from_parts($major[, $minor[, $variant]])" 4 .el .IP "\f(CW$f\fR\->set_from_parts($major[, \f(CW$minor\fR[, \f(CW$variant\fR]])" 4 .IX Item "$f->set_from_parts($major[, $minor[, $variant]])" Sets the source format from its parts. The \f(CW$major\fR part is mandatory. The \f(CW$minor\fR and \f(CW$variant\fR parts are optional. .Sp \&\fBNotice\fR: This function performs no validation. .ie n .IP "($major, $minor, $variant) = $f\->set($format)" 4 .el .IP "($major, \f(CW$minor\fR, \f(CW$variant\fR) = \f(CW$f\fR\->set($format)" 4 .IX Item "($major, $minor, $variant) = $f->set($format)" Sets (and validates) the source \f(CW$format\fR specified. Will return the parsed format parts as a list, the optional \f(CW$minor\fR and \f(CW$variant\fR parts might be undef. .ie n .IP "($major, $minor, $variant) = $f\->\fBget()\fR" 4 .el .IP "($major, \f(CW$minor\fR, \f(CW$variant\fR) = \f(CW$f\fR\->\fBget()\fR" 4 .IX Item "($major, $minor, $variant) = $f->get()" .PD 0 .ie n .IP "$format = $f\->\fBget()\fR" 4 .el .IP "\f(CW$format\fR = \f(CW$f\fR\->\fBget()\fR" 4 .IX Item "$format = $f->get()" .PD Gets the source format, either as properly formatted scalar, or as a list of its parts, where the optional \f(CW$minor\fR and \f(CW$variant\fR parts might be undef. .ie n .IP "$count = $f\->parse($fh, $desc)" 4 .el .IP "\f(CW$count\fR = \f(CW$f\fR\->parse($fh, \f(CW$desc\fR)" 4 .IX Item "$count = $f->parse($fh, $desc)" Parse the source format string from \f(CW$fh\fR, with filehandle description \f(CW$desc\fR. .ie n .IP "$count = $f\->load($filename)" 4 .el .IP "\f(CW$count\fR = \f(CW$f\fR\->load($filename)" 4 .IX Item "$count = $f->load($filename)" Parse \f(CW$filename\fR contents for a source package format string. .ie n .IP "$str = $f\->output([$fh])" 4 .el .IP "\f(CW$str\fR = \f(CW$f\fR\->output([$fh])" 4 .IX Item "$str = $f->output([$fh])" .PD 0 .IP """$f""" 4 .IX Item """$f""" .PD Returns a string representing the source package format version. If \f(CW$fh\fR is set, it prints the string to the filehandle. .ie n .IP $f\->save($filename) 4 .el .IP \f(CW$f\fR\->save($filename) 4 .IX Item "$f->save($filename)" Save the source package format into the given \f(CW$filename\fR. .SH CHANGES .IX Header "CHANGES" .SS "Version 1.00 (dpkg 1.19.3)" .IX Subsection "Version 1.00 (dpkg 1.19.3)" Mark the module as public.