NAME

Dpkg::Control - parse files like debian/control

DESCRIPTION

It provides an object to access data of files that follow the same syntax than debian/control.

FUNCTIONS

$c = Dpkg::Control->new($file)

Create a new Dpkg::Control object for $file. If $file is omitted, it parses debian/control.

$c->reset()

Resets what got read.

$c->parse($file)

Parse the content of $file. Exits in case of errors.

$c->get_source()

Returns a reference to a hash containing the fields concerning the source package. The hash is tied to Dpkg::Fields::Object.

$c->get_pkg_by_idx($idx)

Returns a reference to a hash containing the fields concerning the binary package numbered $idx (starting at 1). The hash is tied to Dpkg::Fields::Object.

$c->get_pkg_by_name($name)

Returns a reference to a hash containing the fields concerning the binary package named $name. The hash is tied to Dpkg::Fields::Object.

$c->get_packages()

Returns a list containing the hashes for all binary packages.

$c->dump($filehandle)

Dump the content into a filehandle.

AUTHOR

Raphael Hertzog <hertzog@debian.org>.