Linux:...ackages(3pm)

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

πŸ’– Linux::Distribution::Packages πŸ’–

okay so bestie, welcome to Linux::Distribution::Packages β€” the little Perl module that literally just... tells you every single package on your Linux box?? iconic behavior tbh πŸ‘‘


✨ NAME ✨

Linux::Distribution::Packages β€” it lists all the packages on various Linux distributions. that's the whole gig. no cap.


🌸 SYNOPSIS 🌸

use Linux::Distribution::Packages qw(distribution_packages distribution_write);

$linux = new Linux::Distribution::Packages({'format' => 'csv', 'output_file' => 'packages.csv'});
$linux->distribution_write();

# Or you can (re)set the options when you write.
$linux->distribution_write({'format' => 'xml', 'output_file' => 'packages.xml'});

# If you want to reload the package data
$linux->distribution_packages();

like. she's simple. she's effective. she ate πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: this is a simple module that uses Linux::Distribution to guess which linux distribution you're on (detective work ✨), and then it uses the correct commands to list all the packages on the system, and then it outputs them in one of three formats:

  • native
  • csv
  • xml

three formats, pick your fighter πŸŽ€

Distributions currently working:

  • debian
  • ubuntu
  • fedora
  • redhat
  • suse
  • gentoo
  • slackware
  • redflag

(if your distro isn't on the list, don't come for her, she's doing her best 😭)

also important: the module inherits from Linux::Distribution, so you can also use its calls. free real estate, bestie 🫢

πŸ’œ EXPORT πŸ’œ

None by default.

that's it. that's the section. nothing exported unless you ask. she's lowkey like that.


πŸ”₯ TODO πŸ”₯

things she's manifesting for the future ✨:

  • Add the capability to correctly get packages for all recognized distributions.
  • Separate out parsing from writing. Parse data to hash and give access to hash. Then write the formatted data from the hash.

manifesting this for her fr fr πŸ™


πŸ‘‘ AUTHORS πŸ‘‘

  • Judith Lebzelter, <judith@osdl.org>
  • Alberto Re, <alberto@accidia.net>

thank you for your service queens πŸ«‘πŸ’–


This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.

so basically: go off, remix it, share it, just keep it Perl-licensed the way Perl itself is, at 5.8.5 or anything newer you've got. slay πŸ’…

and that's the whole page bestie!! this was documented with perl v5.36.0, dated 2022-12-08, from the User Contributed Perl Documentation β€” mwah, take care of her, she's precious πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from