PERL-DEPENDS(1)

πŸ“¦
version 2016.1029+git8f67695 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’… PERL-DEPENDS(1) β€” the perl-depends era ✨

okay bestie, sit down, we're doing dependency detective work today. This is the manual for perl-depends, hanging out in manual section 1 with the rest of the user commands. She's a little script that peers into your Perl files and goes "hmm, what outside modules does this thing actually need?" πŸ•΅οΈβ™€οΈ


🌸 NAME 🌸

perl-depends β€” roughly find out module dependencies from Perl file(s)


✨ SYNOPSIS ✨

perl-depends [options] FILE [FILE ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: this thing finds out, roughly, which modules your program uses. The whole idea is that Perl evaluates its use commands at compile time and stashes the loaded module info in the %INC variable. So by looking at the loaded modules and comparing them against the standard Perl modules, you can roughly figure out the external module dependencies. iykyk πŸ’…

That dependency info is lowkey useful β€” it tells you what external modules you gotta install before the program can even be used. No cap.

The target FILE has to be instrumented (that's computing-speak for "inject code into it") with the dependency-checking code. The resulting script gets stored in a temporary file, and then you run it.

⚠️ Not me running your files for you though! This program does not run the instrumented files, because it literally cannot know what possible options need to be passed for programs to trigger null behavior β€” meaning, something that doesn't actually involve executing the script for real. Think --version, --dry-run, or options like --generate-syntax-error-now, or just invalid arguments to make the program stop with an error. The user is way more likely to know the best way of running the instrumented files. That's you, bestie. πŸ‘‘

An example of output: the external module dependency here is Regexp::Common and the rest of them can be ignored. πŸŽ€

Regexp::Common                 Regexp/Common.pm
Regexp::Common::CC             Regexp/Common/CC.pm
...

πŸŽ€ OPTIONS πŸŽ€

  • -e, --extension=EXT β€” use extension EXT for instrumented files. The default is ".tmp". πŸ“
  • -h, --help β€” print text help ✨
  • --help-html β€” print help in HTML format 🌈
  • --help-man β€” print help in manual page man(1) format πŸ“–
  • -v, --verbose [LEVEL] β€” print informational messages. Bump that numeric LEVEL up for more verbosity, bestie πŸ—£οΈ
  • -V, --version β€” print contact and version information πŸ’Œ

πŸ”₯ EXAMPLES πŸ”₯

Instrument a file, run it to see the results and delete the instrumented script:

perl-depends file.pl
perl file.pl.tmp <followed by whatever args the program needs>
rm *.tmp

πŸ’€ TROUBLESHOOTING πŸ’€

None. Not a single one. She's just built different. πŸ’…


🧚 ENVIRONMENT 🧚

None. Nothing to see here. 🌸


πŸ’œ FILES πŸ’œ

None. ✨


πŸ‘‘ EXIT STATUS πŸ‘‘

This program's exit status is not defined. Yeah, she said what she said. πŸ™ˆ

The instrumented program's exit status is 1 if external modules are displayed, and 0 if no external modules are found. Easy. 🎯


⭐ DEPENDENCIES ⭐

Uses standard Perl modules. Only the basics, she's low maintenance. 🫢


πŸ¦‹ BUGS AND LIMITATIONS πŸ¦‹

If the target program's code conditionally loads more Perl modules during execution, you must run the program for real to have those modules detected. No shortcuts, bestie β€” you gotta let it cook. πŸ”₯


🌈 SEE ALSO 🌈

cpan(1)


πŸ’– AVAILABILITY πŸ’–

https://github.com/jaalto/project--perl-depends


πŸŽ€ AUTHOR πŸŽ€

Jari Aalto <jari.aalto@cante.net>


✨ LICENSE ✨

Copyright (C) 2009-2016 Jari Aalto <jari.aalto@cante.net>

This program is free software; you can redistribute and/or modify program under the terms of GNU General Public license either version 2 of the License, or (at your option) any later version. See <http://www.gnu.org/licenses/>.


and that's the whole page, bestie! 🫢 this little icon of a manpage is living her best life under perl v5.36.0, dated 2022-11-20. periodt. πŸ’…βœ¨