Dpkg::Changelog::Entry(3perl) libdpkg-perl Dpkg::Changelog::Entry(3perl)

# [NAME](#NAME)

Dpkg::Changelog::Entry - represents a changelog entry

# [DESCRIPTION](#DESCRIPTION)

This class represents a changelog entry. It is composed of a set of lines with specific purpose: a header line, changes lines, a trailer line. Blank lines can be between those kind of lines.

# [METHODS](#METHODS)

$entry = Dpkg::Changelog::Entry-&gt;**new()**

Creates a new object. It doesn't represent a real changelog entry until one has been successfully parsed or built from scratch.

$string = "$entry"

$string = $entry-&gt;output(\[$fh])

Get a string representation of the changelog entry.

Optionally, print the string representation of the changelog entry to a filehandle.

$string = $entry-&gt;get\_part($part)

@part = $entry-&gt;get\_part($part)

Return either a string (for a single line) or an array ref (for multiple lines) corresponding to the requested part. $part can be "header, "changes", "trailer", "blank\_after\_header", "blank\_after\_changes", "blank\_after\_trailer".

$entry-&gt;set\_part($part, $value)

Set the value of the corresponding part. $value can be a string or an array ref.

$entry-&gt;extend\_part($part, $value)

Concatenate $value at the end of the part. If the part is already a multi-line value, $value is added as a new line otherwise it's concatenated at the end of the current line.

$bool = $entry-&gt;**is\_empty()**

Returns 1 if the changelog entry doesn't contain anything at all. Returns 0 as soon as it contains something in any of its non-blank parts.

$entry-&gt;**normalize()**

Normalize the content. Strip whitespaces at end of lines, use a single empty line to separate each part.

$src = $entry-&gt;**get\_source()**

Return the name of the source package associated to the changelog entry.

$ver = $entry-&gt;**get\_version()**

Return the version associated to the changelog entry.

@dists = $entry-&gt;**get\_distributions()**

Return a list of target distributions for this version.

$ctrl = $entry-&gt;**get\_optional\_fields()**

Return a set of optional fields exposed by the changelog entry. It always returns a Dpkg::Control object (possibly empty though).

$urgency = $entry-&gt;**get\_urgency()**

Return the urgency of the associated upload.

$maint = $entry-&gt;**get\_maintainer()**

Return the string identifying the person who signed this changelog entry.

$time = $entry-&gt;**get\_timestamp()**

Return the timestamp of the changelog entry.

$time = $entry-&gt;**get\_timepiece()**

Return the timestamp of the changelog entry as a Time::Piece object.

This function might return undef if there was no timestamp.

$string = $entry-&gt;**get\_dpkg\_changes()**

Returns a string that is suitable for usage in a "Changes" field in the output format of "dpkg-parsechangelog".

# [CHANGES](#CHANGES)

## [Version 1.01 (dpkg 1.18.8)](#Version_1.01_%28dpkg_1.18.8%29)

New method: $entry-&gt;**get\_timepiece()**.

## [Version 1.00 (dpkg 1.15.6)](#Version_1.00_%28dpkg_1.15.6%29)

Mark the module as public.

2026-09-09 1.23.11-dirty

---

Document: Dpkg::Changelog::Entry(3perl) from dpkg 1.23.11-r3 (Chainguard OS)
Source: https://git.dpkg.org/git/dpkg/dpkg.git
