Perl::...ricture(3pm)

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

πŸ’– Perl::...ricture(3pm) πŸ’–

okay bestie, pull up a chair, because today we're talking about the Perl::...ricture manual page β€” user-contributed Perl documentation, the whole thing, and it's lowkey a banger πŸŽ€


✨ NAME ✨

TooMuchCode::ProhibitExtraStricture β€” the policy whose whole job is finding unnecessary use strict lines. fr fr, that's it, that's the mission πŸ’…


🌸 DESCRIPTION 🌸

so like, code stricture is good. nobody's arguing. it's giving responsible adult, it's giving main character energy, we stan 🫢

BUT β€” and this is the plot twist β€” that does not mean you always need to physically write use strict in your code. because several other modules already enable code stricture in the current scope, which is effectively the same thing as having use strict. same vibe, zero extra typing ✨

here's the list of those modules, no cap:

Moose
Mouse
Moo
Mo
Moose::Role
Mouse::Role
Moo::Role
Test2::V0

so when one of these modules is used, use strict is considered redundant, and this policy marks it as a violation. periodt πŸ’€

πŸ¦‹ Configuration πŸ¦‹

ngl, the builtin list of stricture modules is obviously not comprehensive β€” it's a starter pack, not the whole closet πŸ™ˆ

you can extend the list by setting the stricture_modules in the config. for example, with the following setting, two modules β€” Foo and Bar β€” get appended to the list of stricture modules. iconic behaviour, honestly πŸ‘‘

[TooMuchCode::ProhibitExtraStricture]
stricture_modules = Foo Bar

and that's the whole page, bestie!! πŸŽ€ this was rendered from perl v5.36.0, dated 2023-10-05, and it lives under the name Perl::...ricture(3pm) in the User Contributed Perl Documentation. go forth and delete those redundant strictures, you absolute legend πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from