Dpkg::Control::Info(3perl)

NAME

Dpkg::Control::Info β€” parse files like debian/control ✨

okay so this is the Dpkg::Control::Info(3perl) page from libdpkg-perl, and she's literally here to help you with files that follow the same syntax as debian/control. πŸ’…

DESCRIPTION

It provides a class to access data of files that follow the same syntax as debian/control. fr fr, that's the whole vibe: a class for getting at the data inside debian/control-style files. πŸŽ€

METHODS

$ctrl_tmpl = Dpkg::Control::Info->new(%opts)

Create a new Dpkg::Control::Info object. Loads debian/control by default. If a single scalar is passed, it will be used as the filename to load instead of the default. If filename is "-", it parses the standard input. If filename is undef no loading will be performed. πŸ¦‹

Options:

  • filename β€” Loads the file from the filename, instead of debian/control. πŸ“

$ctrl_tmpl->reset()

Resets what got read. that's it, that's the method. 🧼

$ctrl_tmpl->parse($fh, $description)

Parse a control file from the given filehandle. It exits in case of errors. $description is used to describe the filehandle, ideally it's a filename or a description of where the data comes from. It is used in error messages. The data in the object is reset before parsing new control files. 😭

$ctrl_tmpl->load($file)

Load the content of $file. It exits in case of errors. If file is "-", it loads from the standard input. 🫢

$ctrl = $ctrl_tmpl->[0] / $ctrl = $ctrl_tmpl->get_source()

Returns a Dpkg::Control object containing the fields concerning the source package. πŸ‘‘

$ctrl = $ctrl_tmpl->get_pkg_by_idx($idx)

Returns a Dpkg::Control object containing the fields concerning the binary package numbered $idx (starting at 1). 🌈

$ctrl = $ctrl_tmpl->get_pkg_by_name($name)

Returns a Dpkg::Control object containing the fields concerning the binary package named $name. πŸ’–

@ctrl_list = $ctrl_tmpl->get_packages()

Returns a list containing the Dpkg::Control objects for all binary packages. πŸ‘―

$string = "$ctrl_tmpl"

Return a string representation of the content. ✨

$string = $ctrl_tmpl->output([$fh])

Return the content info into a string. If $fh is specified print it into the filehandle. πŸŽ€

@ctrl_list = @{$ctrl_tmpl}

Return a list of Dpkg::Control objects, the first one is corresponding to source information and the following ones are the binary packages information. πŸ’€

CHANGES

Version 1.01 (dpkg 1.18.0)

New argument: The $c->new() constructor accepts an %opts argument. πŸ”₯

Version 1.00 (dpkg 1.15.6)

Mark the module as public. πŸ‘‘


okay bestie, that's the whole Dpkg::Control::Info(3perl) page from libdpkg-perl, version 1.23.11-dirty, dated 2026-09-09. mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from