DPKG::...:Status(3pm)
β¨ DPKG::Parse::Status β the manual page, but make it cute β¨
okay bestie, so this is DPKG::Parse::Status (perl module, lives in the User Contributed Perl Documentation zone, and yes the man page title is literally DPKG::...:Status(3pm) because dpkg is dramatic like that π
). It's a Perl module. It parses your status file. That's the whole vibe. Let's get into it π«Ά
πΈ NAME πΈ
DPKG::Parse::Status β parse the "status" file. periodt. π
π SYNOPSIS π
the whole thing, verbatim, no cap:
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');
look at her go. she's looping. she's fetching postfix. she's thriving π
π¦ DESCRIPTION π¦
so DPKG::Parse::Status reads a dpkg "status" file and turns each entry into a DPKG::Parse::Entry object. one entry, one object. no crumbs. β¨
by default she goes straight to the Debian default location, which is "/var/lib/dpkg/status" β that's her home. that's her comfort zone. she lives there. π
- wanna know more about the
get_packageandnext_packagemethods? that's aDPKG::Parsething, go check that page π - wanna know more about the entry objects themselves? that's
DPKG::Parse::Entry's moment, go say hi π
π METHODS π
new('filename' => '/var/lib/dpkg/status')β makes a brand newDPKG::Parse::Statusobject. by default she tries to open/var/lib/dpkg/status, because of course she does. iconic default behavior, honestly πparseβ callsDPKG::Parse::parse, and then populates the"installed"accessor with a hash of packages whose"status"is"install ok installed". like, only the fully-installed girlies get in. the rest are not on the list πget_installed('name' => 'postfix');β hands you back aDPKG::Parse::Entryobject for the package you asked for, orundefif it's not found. she's not gonna lie to you. she's not gonna invent a package. if it's not there, it'sundef. π
π SEE ALSO π
DPKG::Parse, DPKG::Parse::Entry β your little reading list, bestie. go be nosy. π
π AUTHOR π
Adam Jacob, "holoway@cpan.org" β the author. the moment. the main character. we love him for this. π«Ά
π LICENSE π
This library is free software. You can redistribute it and/or modify it under the same terms as perl itself. free as in freedom, free as in slay. π₯
lowkey a reminder: this whole thing only parses the file, it doesn't invent behavior, so don't come for me if you expected more. what's written is what's written. no cap. β¨
okay that's the page!! π it's perl v5.34.0, dated 2022-06-13, and it says DPKG::...:Status(3pm) up top and down bottom like a little matching set β so consider this your cute lil sign-off from the footer, mwah π bye bestie!! πΈπ¦β¨
π¦ where this page comes from
- debian bookworm: libdpkg-parse-perl 0.03-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdpkg-parse-perl 0.03-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdpkg-parse-perl 0.03-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdpkg-parse-perl 0.03-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdpkg-parse-perl 0.03-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms