06 Dec 2021 20:23:10 UTC
- Distribution: Dpkg
- Module version: 1.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Testers (67 / 40 / 0)
- KwaliteeBus factor: 1
- License: gpl_2
- Perl: v5.28.1
- Activity24 month
- Download (522.16KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Dpkg::Control::Info - parse files like debian/control
It provides a class to access data of files that follow the same syntax as debian/control.
- $c = Dpkg::Control::Info->new(%opts)
Create a new Dpkg::Control::Info object. Loads the file from the filename option, if no option is specified filename defaults to debian/control. If a scalar is passed instead, it will be used as the filename. If filename is "-", it parses the standard input. If filename is undef no loading will be performed.
Resets what got read.
- $c->parse($fh, $description)
Parse a control file from the given filehandle. 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.
Load the content of $file. Exits in case of errors. If file is "-", it loads from the standard input.
Returns a Dpkg::Control object containing the fields concerning the source package.
Returns a Dpkg::Control object containing the fields concerning the binary package numbered $idx (starting at 1).
Returns a Dpkg::Control object containing the fields concerning the binary package named $name.
Returns a list containing the Dpkg::Control objects for all binary packages.
- $str = $c->output([$fh])
Return the content info into a string. If $fh is specified print it into the filehandle.
Return a string representation of the content.
Return a list of Dpkg::Control objects, the first one is corresponding to source information and the following ones are the binary packages information.
New argument: The $c->new() constructor accepts an %opts argument.
Mark the module as public.