1Dpkg::Control::Info(3perl)       libdpkg-perl       Dpkg::Control::Info(3perl)
2
3
4

NAME

6       Dpkg::Control::Info - parse files like debian/control
7

DESCRIPTION

9       It provides an object to access data of files that follow the same
10       syntax as debian/control.
11

METHODS

13       $c = Dpkg::Control::Info->new(%opts)
14           Create a new Dpkg::Control::Info object. Loads the file from the
15           filename option, if no option is specified filename defaults to
16           debian/control.  If a scalar is passed instead, it will be used as
17           the filename. If filename is "-", it parses the standard input. If
18           filename is undef no loading will be performed.
19
20       $c->reset()
21           Resets what got read.
22
23       $c->parse($fh, $description)
24           Parse a control file from the given filehandle. Exits in case of
25           errors.  $description is used to describe the filehandle, ideally
26           it's a filename or a description of where the data comes from. It
27           is used in error messages.  The data in the object is reset before
28           parsing new control files.
29
30       $c->load($file)
31           Load the content of $file. Exits in case of errors. If file is "-",
32           it loads from the standard input.
33
34       $c->[0]
35       $c->get_source()
36           Returns a Dpkg::Control object containing the fields concerning the
37           source package.
38
39       $c->get_pkg_by_idx($idx)
40           Returns a Dpkg::Control object containing the fields concerning the
41           binary package numbered $idx (starting at 1).
42
43       $c->get_pkg_by_name($name)
44           Returns a Dpkg::Control object containing the fields concerning the
45           binary package named $name.
46
47       $c->get_packages()
48           Returns a list containing the Dpkg::Control objects for all binary
49           packages.
50
51       $str = $c->output([$fh])
52           Return the content info into a string. If $fh is specified print it
53           into the filehandle.
54
55       "$c"
56           Return a string representation of the content.
57
58       @{$c}
59           Return a list of Dpkg::Control objects, the first one is
60           corresponding to source information and the following ones are the
61           binary packages information.
62

CHANGES

64   Version 1.01 (dpkg 1.18.0)
65       New argument: The $c->new() constructor accepts an %opts argument.
66
67   Version 1.00 (dpkg 1.15.6)
68       Mark the module as public.
69
70
71
721.19.7                            2020-02-18        Dpkg::Control::Info(3perl)
Impressum