---
name: "Dpkg::Changelog::Parse"
section: "3"
platform: "linux"
package: "libdpkg-perl"
version: "1.18.25"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/Dpkg::Changelog::Parse"
---

# Dpkg::Changelog::Parse(3)

generic changelog parser for dpkg-parsechangelog

## NAME

Dpkg::Changelog::Parse - generic changelog parser for dpkg-parsechangelog

## DESCRIPTION

This module provides a set of functions which reproduce all the features of dpkg-parsechangelog.

## FUNCTIONS

- $fields = changelog\_parse\_debian(%opt)

  This function is deprecated, use *changelog\_parse()* instead, with the changelog format set to "debian".

- $fields = changelog\_parse\_plugin(%opt)

  This function is deprecated, use *changelog\_parse()* instead.

- $fields = changelog\_parse(%opt)

  This function will parse a changelog. In list context, it returns as many Dpkg::Control objects as the parser did create. In scalar context, it will return only the first one. If the parser did not return any data, it will return an empty list in list context or undef on scalar context. If the parser failed, it will die.

  The changelog file that is parsed is *debian/changelog* by default but it can be overridden with `$opt`{file}. The default output format is "dpkg" but it can be overridden with `$opt`{format}.

  The parsing itself is done by a parser module (searched in the standard perl library directories. That module is named according to the format that it is able to parse, with the name capitalized. By default it is either Dpkg::Changelog::Debian (from the "debian" format) or the format name looked up in the 40 last lines of the changelog itself (extracted with this perl regular expression "\\schangelog-format:\\s+(\[0-9a-z\]+)\\W"). But it can be overridden with `$opt`{changelogformat}.

  All the other keys in `%opt` are forwarded to the parser module constructor.

## CHANGES

### Version 1.02 (dpkg 1.18.8)

Deprecated functions: *changelog\_parse\_debian()*, *changelog\_parse\_plugin()*.

Obsolete options: `$forceplugin`, `$libdir`.

### Version 1.01 (dpkg 1.18.2)

New functions: *changelog\_parse\_debian()*, *changelog\_parse\_plugin()*.

### Version 1.00 (dpkg 1.15.6)

Mark the module as public.
