---
name: "DPKG::Parse::Status"
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::Status"
---

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

Parse the "status" file

## NAME

DPKG::Parse::Status - Parse the "status" file

## SYNOPSIS

```
    use DPKG::Parse::Status;
    my $status = DPKG::Parse::Status->new;
    while (my $entry = $status->next_package) {
        print $entry->package . " " . $entry->version . "\n";
    }
    my $postfix = $status->get_package('name' => 'postfix');
    my $postfix = $status->get_installed('name' => 'postfix');
```

## DESCRIPTION

DPKG::Parse::Status parses a dpkg "status" file and turns each entry into a DPKG::Parse::Entry object.  By default, it uses the Debian default location of "/var/lib/dpkg/status".

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' =\> '/var/lib/dpkg/status')

  Creates a new DPKG::Parse::Status object.  By default, it tries to open /var/lib/dpkg/status.

- parse

  Calls DPKG::Parse::parse, and populates the "installed" accessor with a hash of packages whose "status" is "install ok installed".

- get\_installed('name' =\> 'postfix');

  Returns a DPKG::Parse::Entry object for the given package, or undef if it's not found.

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