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's debian/source/format file. 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 no filename has been specified πŸ‘‘
  • $format->set_from_parts($major[, $minor[, $variant]]) β€” sets the source format from its parts. $major is mandatory (like, required required), while $minor and $variant are 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 $format you specified. it returns the parsed format parts as a list, and the optional $minor and $variant parts might be undef πŸ™ˆ
  • ($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 $minor and $variant parts might be undef. 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 $filename looking for a source package format string 🌈
  • $string = "$format"
  • $string = $format->output([$fh]) β€” returns a string representing the source package format version. and if $fh is 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