Module::Depends(3pm)

πŸ“¦
version 0.16 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Module::Depends(3pm) πŸ’–

okay so bestie, welcome to Module::Depends β€” it lives in the User Contributed Perl Documentation section of your friendly neighborhood perl manual, and it's here to spill the tea on what a distribution actually needs to run. 🫢


✨ NAME ✨

Module::Depends β€” identify the dependencies of a distribution πŸ’…


🌸 SYNOPSIS 🌸

use Module::Depends;
my $deps = Module::Depends->new->dist_dir( '.' )->find_modules;
print "Our dependencies:\n", Dump $deps->requires;

literally three lines and you're done, no cap ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: Module::Depends extracts module dependencies from an unpacked distribution tree. That's the whole job. That's it. πŸ‘‘

But β€” and this is the important part, bestie β€” Module::Depends only evaluates the META.yml shipped with a distribution. It does not go digging. It does not read your source. It trusts the META.yml and that's it.

And that won't actually be effective until all distributions ship META.yml files, which like… they don't all do, so. Because of that, the docs suggest you take your life in your hands 😭 and go look at Module::Depends::Intrusive instead. dramatic? yes. accurate? also yes.


πŸŽ€ METHODS πŸŽ€

🌈 new

simple constructor. That's the whole description. It's giving minimalist. πŸ’…

🌈 dist_dir

Path where the distribution has been extracted to. πŸ“

🌈 find_modules

Scan the dist_dir to populate libs, requires, configure_requires, test_requires, and build_requires. this is the main character of the module fr fr ✨

🌈 libs

An array reference of lib lines. πŸ“š

🌈 requires

A reference to a hash enumerating the prerequisite modules for this distribution. πŸ‘‘

🌈 configure_requires

A reference to a hash enumerating the prerequisite modules to configure this distribution. πŸ”§

🌈 build_requires

A reference to a hash enumerating the modules needed to build the distribution. πŸ—οΈ

🌈 error

A reason, if any, for failing to get dependencies. aka the "why is this not working" field, and honestly? relatable. 😭


πŸ’œ AUTHOR πŸ’œ

Richard Clamp, based on code extracted from the Fotango build system originally by James Duncan and Arthur Bergman. 🫢 iconic lineage honestly.


Copyright 2010, Richard Clamp. Copyright 2004-2008, Fotango.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay, open source πŸ’–


⭐ SEE ALSO ⭐

  • Module::Depends::Intrusive β€” the chaotic one. go say hi. πŸ‘€

heads up bestie: if a distribution doesn't ship a META.yml, this module is gonna have a bad time. the docs said it themselves. πŸ™ˆ

k bye, this page came to you from the perl v5.36.0 docs, dated 2022-11-19, under the Module::Depends(3pm) name πŸ’…βœ¨ go read your META.yml and hydrate 🫢

πŸ“¦ where this page comes from