Perl::...oStrict(3pm)

πŸ’… NAME ✨

Perl::Critic::Policy::TestingAndDebugging::ProhibitNoStrict β€” bestie, this policy is here to prohibit the various flavors of no strict. Yep, all of them. 🚫

Oh and real quick, the page header situation: this is Perl::...oStrict(3pm) from the User Contributed Perl Documentation, okurrr. πŸ’–


🫢 AFFILIATION 🌸

This Policy is part of the core Perl::Critic distribution. So it's, like, canon. πŸ‘‘


πŸ’€ DESCRIPTION πŸ”₯

Okay so listen πŸ‘‚ β€” there are genuinely good reasons for disabling certain kinds of strictures. Like, valid. Respectable. We get it.

But β€” and this is the whole vibe β€” if you were wise enough to use strict in the first place, then it literally does not make sense to disable it completely. It's giving "I studied for the test and then threw away my notes." 😭

By default, any no strict statement will violate this policy. Any of them. Periodt. πŸ’…

However!! You can configure this Policy to allow certain types of strictures to be disabled (see "CONFIGURATION" below, bestie, it's right there ⬇️).

⚠️ One thing that will always raise a violation, no matter how you configure things: a bare no strict statement. No exceptions, no mercy, no notes. πŸ’€

πŸŽ€ CONFIGURATION πŸ¦‹

The permitted strictures can be configured via the allow option. ✨

The value is a list of whitespace-delimited stricture types that you want to permit. These can be vars, subs and/or refs. Choose wisely, my love. πŸ™ˆ

An example of this customization:

[TestingAndDebugging::ProhibitNoStrict]
allow = vars subs refs

Look at you go, customizing. Iconic behavior honestly. 🌈


πŸ‘€ SEE ALSO ⭐

  • Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict β€” the other half of this little duo, go say hi 🫢

πŸ’œ AUTHOR 🌸

Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>


Copyright (c) 2005-2021 Imaginative Software Systems. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.


That's the whole page, bestie β€” no cap. πŸ’– This version came to you courtesy of perl v5.42.0, dated 2024-10-23, and it's still out here doing the Perl::...oStrict(3pm) thing. Slay. πŸ‘‘βœ¨

πŸ“¦ where this page comes from