Perl::...nclude(3pm)

πŸ“¦
version 0.19 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

TooMuchCode::ProhibitUnusedInclude β€” bestie, this is the policy that goes hunting for unused include statements πŸ‘€βœ¨

Oh also, hi, you're reading Perl::...nclude(3pm) from the User Contributed Perl Documentation collection, title Perl::...nclude πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so listen. This critic policy scans for unused include statements, and it figures out what counts as "unused" based on their documentation. That's the whole vibe check πŸ’…

Like, real example, fr fr: Try::Tiny implicitly introduces a try subroutine that takes a block. So if you've got a lonely little

use Try::Tiny;

just sitting there all by itself with no try { .. } block anywhere in its scope? 🫢 That's it. That's an "Unused Include". Caught in 4K πŸ“Έ

Notice: this module uses a hard-coded list of commonly-used CPAN modules along with the symbols exported from them. It's relatively static, yeah, but it still needs to be revised from time to time. Not me being the maintenance reminder 😭

and that's the whole page, bestie, you ate πŸ’…

Sign-off cuteness: this one's from perl v5.36.0, dated 2023-10-05 πŸŽ€ β€” go forth and delete your dead use statements, the unused includes never stood a chance πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from