DPKG::...ilable(3pm)
π DPKG::Parse::Available π
okay bestie, so you know that dpkg "available" file? the one just vibing at /var/lib/dpkg/available? this module is literally the translator for it. it's part of the DPKG::Parse family and it's here to make that file make sense. no cap.
β¨ SYNOPSIS β¨
like, the whole point, in one little code snack:
use DPKG::Parse::Available;
my $available = DPKG::Parse::Available->new;
while (my $entry = $available->next_package) {
print $entry->package . " " . $entry->version . "\n";
}
my $postfix = $available->get_package('name' => 'postfix');
that's it. that's the whole vibe. π
πΈ DESCRIPTION πΈ
DPKG::Parse::Available reads a dpkg "available" file and turns every single entry into a DPKG::Parse::Entry object. it's giving β¨ data structure glow-up β¨.
by default it goes for the Debian default location, which is /var/lib/dpkg/available. so if you don't tell it where the file lives, that's where it's looking. periodt.
want the tea on the get_package and next_package methods? go read DPKG::Parse, it's all there.
want the tea on the entry objects themselves? that's DPKG::Parse::Entry, bestie. π«Ά
π METHODS π
new('filename' => '/var/lib/dpkg/available')β makes you a brand newDPKG::Parse::Availableobject. if you don't pass afilename, it just tries to open/var/lib/dpkg/availableon its own, main character energy fr fr. π
π SEE ALSO π
DPKG::Parse, DPKG::Parse::Entry
π AUTHOR π
Adam Jacob, "holoway@cpan.org" β shoutout to the icon who wrote this. π
β LICENSE β
this library is free software. you can redistribute it and/or modify it under the same terms as perl itself. slay. legal and cute.
not me being obsessed with a manpage π anyway go parse something bestie
and that's the whole page!! this came from perl v5.34.0, dated 2022-06-13, and yeah the manual name is DPKG::...ilable(3pm) β the truncated lil cutie. iykyk π β¨ π¦
π¦ 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