Perl::...English(3pm)

πŸ’– NAME πŸ’–

okay so welcome to the Perl::...English(3pm) page from the User Contributed Perl Documentation crew, bestie! ✨ the policy here is Perl::Critic::Policy::Modules::RequireNoMatchVarsWithUseEnglish β€” and its whole thing is: use English must be passed a -no_match_vars argument. no cap. πŸ’…

πŸ¦‹ AFFILIATION πŸ¦‹

This Policy is part of the core Perl::Critic distribution. periodt. 🫢

✨ DESCRIPTION ✨

okay so here's the unfortunate history tea, and it's giving big performance oof: if you use English but don't pass in a -no_match_vars argument, all regular expressions in the entire program β€” not merely the module in question β€” suffer a significant performance penalty, even if you only import a subset of the variables. πŸ’€

use English;                              # not ok
use English '-no_match_vars';             # ok
use English qw< $ERRNO -no_match_vars >;  # ok
use English qw($OS_ERROR);                # not ok

In the last example above, while the match variables aren't loaded into your namespace, they are still created in the English namespace and you still pay the cost. so yeah, still not it, bestie 😭

πŸŽ€ CONFIGURATION πŸŽ€

This Policy is not configurable except for the standard options. that's it, that's the config section. πŸŽ€

🌸 AUTHOR 🌸

shoutout to Elliot Shank "<perl@galumph.com>" for this one. πŸ‘‘

Copyright (c) 2008-2011 Elliot Shank.

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.


source/version: perl v5.42.0 Β· date: 2024-10-23 Β· page: Perl::...English(3pm) β€” that's the whole manual, bestie, go off and have the best day πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from