NAME

Dpkg::Cdata - parse and manipulate a block of RFC822-like fields

DESCRIPTION

The Dpkg::Cdata module exports one function 'parsecdata' that reads a block of data (usually a block following the debian/control format)

FUNCTIONS

$obj = Dpkg::Cdata::parsecdata($input, $file, %options)

$input is a filehandle, $file is the name of the file corresponding to $input. %options can contain two parameters: allow_pgp=>1 allows the parser to extrac the block of a data in a PGP-signed message (defaults to 0), and allow_duplicate=>1 ask the parser to not fail when it detects duplicate fields.

The return value is a reference to a tied hash (Dpkg::Fields::Object) that can be used to access the various fields.