Alien::Packages(3pm)

πŸ“¦ version 0.003, in fedora 43

🌸 Alien::Packages πŸ’…

okay bestie, welcome to Alien::Packages(3pm) β€” the Perl module that's literally just "hey, what's installed on this machine and who owns this file?" no cap. it's giving detective energy but for your package manager πŸ”βœ¨


✨ NAME ✨

Alien::Packages β€” find information of installed packages πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

like, here's the whole vibe in code, verbatim, don't touch it:

my $ap = Alien::Packages->new();

my @packages = $ap->list_packages();
foreach my $pkg (@packages)
{
    print "$pkg->[0] version $pkg->[1]: $pkg->[2]\n";
}

my %perl_owners = $ap->list_fileowners( File::Spec->rel2abs( $^X ) );
while( my ($fn, $pkg) = each( %perl_owners ) )
{
    print "$fn is provided by ", join( ", ", @$pkg ), "\n";
}

see? you make an object, you ask it stuff, it tells you stuff. main character behaviour fr 🫢


πŸ‘‘ SUBROUTINES/METHODS πŸ‘‘

πŸ’œ new

Instantiates a brand new Alien::Packages object. slay.

Attributes can be specified for the finder it uses (of type Module::Pluggable::Object). plus, on top of that:

  • "only_loaded" β€” only use plugins that are still loaded.

you can pass this with a true value. what it does is force it to grep %INC instead of using Module::Pluggable. yes queen, it's a shortcut, and it's iconic πŸ’…

🌈 list_packages

Lists the installed packages on the system (if the caller has the permission to do, so like… vibe check your privileges first, bestie 😭).

Results in a list of array references, whereby each item contains:

{
    PkgType => $pkg_type, # e.g. 'dpkg', 'pkgsrc', ...
    Package => $pkg_name,
    Version => $version,
    Summary => $summary,
}

"type" is the packager type, e.g. rpm, lpp or pkgsrc. so you always know who is talking πŸ‘‘

πŸŽ€ list_fileowners

Provides an association between files on the system and the package which reference it (has presumably installed it). like, "whose child is this file" energy πŸ₯Ί

Returns a hash with the files names as key and a list of referencing package names as value:

'/absolute/path/to/file' =>
    [
        {
            PkgType => $pkg_type,
            Package => $pkg_name,
        }
    ],
...

🌸 AUTHOR 🌸

Jens Rehsack, "<rehsack at cpan.org>" β€” thank you for your service, king πŸ«‘πŸ’–


🧚 GETTING HELP 🧚

To get novice help, it's usually recommended to ask on typical platforms like PerlMonks. To help you make the best use of the PerlMonks platform, and any other lists or forums you may use, I strongly recommend that you read "How To Ask Questions The Smart Way" by Eric Raymond: <http://www.catb.org/~esr/faqs/smart-questions.html>. yes bestie, read it, it'll save you so much πŸ’€

If you really asks a question what noone can answer, please drop me a note with the question URL to either my CPAN address or on "irc.perl.org" in the channels "#toolchain" or "#devops". I'll try to answer as best as I can (and as soon, as possible, of course). 🫢

⭐ Where can I go for help with a concrete version?

Bugs and feature requests are accepted against the latest version only. To get patches for earlier versions, you need to get an agreement with a developer of your choice β€” who may or not report the issue and a suggested fix upstream (depends on the license you have chosen). so like, old versions are on their own, sorry bestie 😭

πŸ’œ Business support and maintenance

For business support you can contact Jens via his CPAN email address rehsackATcpan.org. Please keep in mind that business support is neither available for free nor are you eligible to receive any support based on the license distributed with this package. like, this one is actually paid, no free trial, no cap πŸ’…


πŸ’€ BUGS πŸ’€

This module is alpha software, the API may change in future releases. See Alien::Packages::Roadmap for more details. so yeah, it's in its experimental era 🌱

Please report any bugs or feature requests to "bug-alien-packages at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Alien-Packages>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. iconic loop, honestly πŸ”₯


🌈 SUPPORT 🌈

You can find documentation for this module with the perldoc command.

perldoc Alien::Packages

You can also look for information at:

  • RT: CPAN's request tracker

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-Packages>

  • AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/Alien-Packages>

  • CPAN Ratings

<http://cpanratings.perl.org/d/Alien-Packages>

  • Search CPAN

<http://search.cpan.org/dist/Alien-Packages/>

If you think you've found a bug then please also read "How to Report Bugs Effectively" by Simon Tatham: <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>. it's giving homework but it's good homework, iykyk ✨


πŸŽ€ RESOURCES AND CONTRIBUTIONS πŸŽ€

There're several ways how you can help to support future development: You can hire the author to implement the features you require at most (this also defines priorities), you can negotiate a support and maintenance contract with the company of the author and you can provide tests and patches. Further, you can submit documentation and links to resources to improve or add packaging systems or grant remote access to machines with insufficient supported packaging tools. basically: throw money, throw patches, throw docs, throw a shell β€” the author will take any of it 🫢🌸


πŸ’– ACKNOWLEDGEMENTS πŸ’–

(literally nothing here, bestie β€” the section exists but it's empty, and we respect that. silent but slaying πŸ’…)


Copyright 2010 Jens Rehsack.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.


okay that's the whole page!! this one's from perl v5.42.0 and it was dated 2025-07-25 β€” so go forth, list some packages, find some file owners, and remember: every file has a parent, and now you can find out who πŸ’–βœ¨πŸŽ€ bye bestie!! πŸ¦‹

πŸ“¦ where this page comes from