Dpkg::Source::Format(3perl)
π Dpkg::Source::Format π
ok so this is a page from libdpkg-perl, bestie β welcome to the Dpkg::Source::Format show, the little Perl class that handles your debian/source/format files π
β¨ NAME β¨
Dpkg::Source::Format β literally here to manipulate debian/source/format files, no cap π
πΈ DESCRIPTION πΈ
This module hands you a whole class that can manipulate Debian source package debian/source/format files. that's it, that's the vibe. it's giving "small but essential," iykyk π¦
π₯ METHODS π₯
$format = Dpkg::Source::Format->new(%opts)β creates a brand new object that corresponds to a source package'sdebian/source/formatfile. new object, who dis π
the options are:
filenameβ sets the filename to use to parse and set the format πformatβ sets and validates the format to use, instead of loading the default file, but only if nofilenamehas been specified π
$format->set_from_parts($major[, $minor[, $variant]])β sets the source format from its parts.$majoris mandatory (like, required required), while$minorand$variantare optional β¨
β οΈ notice: this function performs no validation. zero. none. it's on you, bestie π
($major, $minor, $variant) = $format->set($format)β sets (and validates β unlike its chaotic sibling above) the source$formatyou specified. it returns the parsed format parts as a list, and the optional$minorand$variantparts might beundefπ($major, $minor, $variant) = $format->get()$format = $format->get()β gets the source format, either as a properly formatted scalar, or as a list of its parts, where the optional$minorand$variantparts might beundef. two moods, same method π«Ά$count = $format->parse($fh, $desc)β parses the source format string from$fh, with filehandle description$descβ$count = $format->load($filename)β parses the contents of$filenamelooking for a source package format string π$string = "$format"$string = $format->output([$fh])β returns a string representing the source package format version. and if$fhis set, it prints that string to the filehandle π₯$format->save($filename)β saves the source package format into the given$filename. write it down, keep it safe, slay π
π¦ CHANGES π¦
β Version 1.00 (dpkg 1.19.3)
- marked the module as public. it's official, it's out there, main character energy π
and that's the whole page, bestie! go forth and format your sources π
ok so the sign-off: this was libdpkg-perl, version 1.23.11-dirty, dated 2026-09-09 β and yes the version really does say dirty, we love a messy icon ππ bye bye, mwah! π
π¦ where this page comes from
- arch rolling: dpkg 1.23.11-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms