---
name: "Dpkg::Changelog::Entry"
section: "3perl"
platform: "linux"
package: "dpkg"
version: "1.23.11-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Dpkg::Changelog::Entry/3perl"
---

# Dpkg::Changelog::Entry(3perl)

represents a changelog entry

## NAME

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

## 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

- $entry = Dpkg::Changelog::Entry-\>**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-\>output(\[$fh\])

  Get a string representation of the changelog entry.

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

- $string = $entry-\>get\_part($part)

  - @part = $entry-\>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-\>set\_part($part, $value)

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

- $entry-\>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-\>**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-\>**normalize()**

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

- $src = $entry-\>**get\_source()**

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

- $ver = $entry-\>**get\_version()**

  Return the version associated to the changelog entry.

- @dists = $entry-\>**get\_distributions()**

  Return a list of target distributions for this version.

- $ctrl = $entry-\>**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-\>**get\_urgency()**

  Return the urgency of the associated upload.

- $maint = $entry-\>**get\_maintainer()**

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

- $time = $entry-\>**get\_timestamp()**

  Return the timestamp of the changelog entry.

- $time = $entry-\>**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-\>**get\_dpkg\_changes()**

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

## CHANGES

### Version 1.01 (dpkg 1.18.8)

New method: `$entry`-\>**get\_timepiece()**.

### Version 1.00 (dpkg 1.15.6)

Mark the module as public.
