DPKG::...:Status(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::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_package and next_package methods? that's a DPKG::Parse thing, 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 new DPKG::Parse::Status object. by default she tries to open /var/lib/dpkg/status, because of course she does. iconic default behavior, honestly πŸ’–
  • parse β€” calls DPKG::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 a DPKG::Parse::Entry object for the package you asked for, or undef if it's not found. she's not gonna lie to you. she's not gonna invent a package. if it's not there, it's undef. πŸ™ˆ

🌟 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