1Dpkg::Control::Info(3)           libdpkg-perl           Dpkg::Control::Info(3)
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->load($file)
24           Load the content of $file. Exits in case of errors. If file is "-",
25           it loads from the standard input.
26
27       $c->parse($fh, $description)
28           Parse a control file from the given filehandle. Exits in case of
29           errors.  $description is used to describe the filehandle, ideally
30           it's a filename or a description of where the data comes from. It
31           is used in error messages.  The data in the object is reset before
32           parsing new control files.
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       $c->output($filehandle)
52           Dump the content into a filehandle.
53
54       "$c"
55           Return a string representation of the content.
56
57       @{$c}
58           Return a list of Dpkg::Control objects, the first one is
59           corresponding to source information and the following ones are the
60           binary packages information.
61

CHANGES

63   Version 1.01 (dpkg 1.18.0)
64       New argument: The $c->new() constructor accepts an %opts argument.
65
66   Version 1.00 (dpkg 1.15.6)
67       Mark the module as public.
68
69
70
711.18.25                           2018-06-17            Dpkg::Control::Info(3)
Impressum