DPKG::...ackages(3pm)
π DPKG::Parse::Packages π
okay bestie, so this is DPKG::Parse::Packages, a Perl module from the User Contributed Perl Documentation section (that's the 3pm part of the manual name, iykyk). And no cap, it does exactly one thing but it does it gorgeously: it parses the Packages file. Slay. π
β¨ NAME β¨
DPKG::Parse::Packages β Parse the Packages file. that's it, that's the whole vibe. πΈ
π¦ SYNOPSIS π¦
here's the main character moment, fr fr:
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');
look at that. create it, loop it, grab a package by name. iconic. π
π DESCRIPTION π
DPKG::Parse::Packages parses a dpkg/apt style Packages file and turns every single entry into a DPKG::Parse::Entry object. one entry, one object, no crumbs left behind. β¨
need the tea on get_package and next_package? that's over in DPKG::Parse. literally go look, it's all there. π«Ά
want the whole lore on the entry objects themselves? DPKG::Parse::Entry has you covered, bestie. π
π METHODS π
new('filename' => '/usr/src/packages/Packages')β creates a brand newDPKG::Parse::Packagesobject, fresh out of the box. and by default? it tries to open/usr/src/packages/Packages, so if you don't pass afilenameit's just gonna go for that one. defaults, we love her. π
π₯ SEE ALSO π₯
DPKG::Parse, DPKG::Parse::Entry
(the whole friend group, honestly. go say hi. πΈ)
π AUTHOR π
Adam Jacob, "holoway@cpan.org" β the actual legend who made this happen. shoutout. π«Ά
β LICENSE β
This library is free software. You can redistribute it and/or modify it under the same terms as perl itself. free software era, we stan π
okay that's the whole page, and here's the cute little sign-off from the footer: this doc is from perl v5.34.0, dated 2022-06-13, and it lives at DPKG::...ackages(3pm). bye bestie, go parse some packages πβ¨π¦
π¦ 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