OTHER OBJECTS

Dpkg::Fields::Object

This object is used to tie a hash. It implements hash-like functions by normalizing the name of fields received in keys (using Dpkg::Fields::capit). It also stores the order in which fields have been added in order to be able to dump them in the same order.

Dpkg::Fields::Object->new()

Return a reference to a tied hash implementing storage of simple "field: value" mapping as used in many Debian-specific files.

tied(%hash)->find_custom_field($name)

Scan the fields and look for a user specific field whose name matches the following regex: /X[SBC]+-$name/i. Return the name of the field found or undef if nothing has been found.

tied(%hash)->get_custom_field($name)

Identify a user field and retrieve its value.

my $str = tied(%hash)->dump() =head2 tied(%hash)->dump($fh)

Dump the raw content of the hash either as a string or to a filehandle.

tied(%hash)->set_field_importance(@fields)

Define the order in which fields will be displayed in the output() method.

tied(%hash)->output($fh, $substvars)

If $fh is defined, print the fields on the $fh filehandle after substitution of variables defined in the Dpkg::Substvars object.

Also returns the string of what would printed on the filehandle.