---
name: "DPKG::Parse::Packages"
section: "3pm"
platform: "linux"
package: "libdpkg-parse-perl"
version: "0.03-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/DPKG::Parse::Packages"
---

# DPKG::Parse::Packages(3pm)

Parse the Packages file

## NAME

DPKG::Parse::Packages - Parse the Packages file

## SYNOPSIS

```
    use DPKG::Parse::Packages;
    my $packages = DPKG::Parse::Packages->new(
        'filename' => '/usr/src/packages/Packages',
    );
    while (my $entry = $packages->next_package) {
        print $entry->package . " " . $entry->version . "\n";
    }
    my $postfix = $packages->get_package('name' => 'postfix');
```

## DESCRIPTION

DPKG::Parse::Packages parses a dpkg/apt style Packages file and turns each entry into a DPKG::Parse::Entry object.

See DPKG::Parse for more information on the get\_package and next\_package methods.

See DPKG::Parse::Entry for more information on the entry objects.

## METHODS

- new('filename' =\> '/usr/src/packages/Packages')

  Creates a new DPKG::Parse::Packages object.  By default, it tries to open /usr/src/packages/Packages.

## SEE ALSO

DPKG::Parse, DPKG::Parse::Entry

## AUTHOR

Adam Jacob, `"holoway@cpan.org"`

## LICENSE

This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.
