DPKG::...ilable(3pm)

πŸ“¦
version 0.03 Β· 2 versions
  • 0.03 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.03 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 new DPKG::Parse::Available object. if you don't pass a filename, it just tries to open /var/lib/dpkg/available on 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