SCANDEPS(1p)

πŸ“¦
version 1.37 Β· 6 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

🌸 SCANDEPS β€” the 1p manual page, but make it a group chat πŸ’…

okay so bestie, this is the man page for scandeps, a lil utility from the User Contributed Perl Documentation corner of the world. she scans your files, she tells you what you need, she does NOT gatekeep. let's get into it 🫢


✨ NAME ✨

scandeps β€” scan file prerequisites. that's it, that's the whole vibe. she looks at your files and tells you what they need. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

% scandeps *.pm          # Print PREREQ_PM section for *.pm
% scandeps -e 'STRING'      # Scan an one-liner
% scandeps -B *.pm       # Include core modules
% scandeps -V *.pm       # Show autoload/shared/data files
% scandeps -R *.pm       # Don't recurse
% scandeps -C CACHEFILE  # use CACHEFILE to cache dependencies

look at her go. six lil glow-ups of the same command, each one doing a different thing. iconic behavior fr fr 🌈


πŸ’– DESCRIPTION πŸ’–

so scandeps is, and I quote the vibe here, a simple-minded utility β€” no shade, that's literally her whole thing β€” and what she does is print out the "PREREQ_PM" section that your modules need. like she's writing your shopping list for you. πŸ›’βœ¨

now here's where it gets spicy. if you pass the -T option and you have CPANPLUS installed, then modules that are part of an earlier module's distribution get marked with "S". and modules that don't have a distribution name on CPAN? those get marked with "?". mystery modules. ghost modules. we love a cryptic queen πŸ’€

also β€” if you throw in the -B option β€” modules that belong to a perl distribution on CPAN (which means they are not installable by "CPAN.pm" or "CPANPLUS.pm", bestie, that's important) get marked with "C". 🚫

and finally, the drama continues: modules that have loadable shared object files β€” usually the ones that need a compiler to install, the high-maintenance ones πŸ’… β€” are marked with "X". and if you use the -V flag, those files (plus literally all the other files found) get listed before the main output. she's giving you the receipts first, the summary second. and on top of that, every module file that the scanned code depends on but that wasn't found (and therefore wasn't scanned recursively) gets listed too. these might be genuinely missing modules, or they might be false positives β€” meaning modules your code doesn't actually depend on on this particular platform, but the heuristic picked them up anyway. it happens. she's doing her best. πŸ™ˆ


✨ OPTIONS ✨

every single one, no skipping, no summarizing, periodt πŸ’…

  • -e, --eval=STRING β€” scan STRING as a string that contains perl code.
  • -c, --compile β€” compiles the code and inspects its %INC, on top of doing the static scanning. double the effort, double the tea β˜•
  • -x, --execute β€” executes the code and inspects its %INC, also in addition to static scanning. you may use --xargs to specify @ARGV when the code runs. (yes she will literally run it. be normal about that. 😭)
  • --xargs=STRING β€” if -x is given, this splits the "STRING" using the function shellwords from Text::ParseWords and passes the result as @ARGV when the code executes. fancy word-splitting moment πŸ¦‹
  • -B, --bundle β€” include core modules in the output AND in the recursive search list.
  • -R, --no-recurse β€” only show the dependencies found in the files you listed, and do not recurse. she stays in her lane. πŸ’…
  • -V, --verbose β€” verbose mode, bb: output all files found during the process, and show dependencies between modules and their availability.

additionally, she warns you about any missing dependencies. and if you find missing dependencies that aren't actually dependencies? congrats, you have probably found false positives. πŸŽ‰ (the heuristic said "this is fine" and the heuristic lied.)

  • -C, --cachedeps=CACHEFILE β€” use CACHEFILE to speed up the scanning process by caching dependencies. creates CACHEFILE if it does not exist yet. she's efficient like that ✨
  • -T, --modtree β€” retrieves module information from CPAN if you have CPANPLUS installed.

πŸ‘€ SEE ALSO πŸ‘€

  • Module::ScanDeps
  • CPANPLUS::Backend
  • PAR

go read those if you want the lore, iykyk πŸ“š


🫢 ACKNOWLEDGMENTS 🫢

Simon Cozens, for suggesting this script to be written. the original idea-haver. the blueprint. the moment. we thank you πŸ™


πŸ‘‘ AUTHORS πŸ‘‘

Audrey Tang <autrijus@autrijus.org>


Copyright 2003, 2004, 2005, 2006 by Audrey Tang <autrijus@autrijus.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>


ok and that's the whole page bestie, no notes, she ate and left no crumbs πŸ“

this lil icon has been living her best life since perl v5.40.0, dated 2024-12-15, filed under User Contributed Perl Documentation. mwah πŸ’‹βœ¨πŸŒˆ

πŸ“¦ where this page comes from