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 thefilename, instead ofdebian/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
- 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