Perl::C...tements(3)
π NAME π
okay so bestie, this is Perl::C...tements(3) β a User Contributed Perl Documentation page β and the full policy it's serving is Perl::Critic::Policy::Lax::ProhibitComplexMappings::LinesNotStatements. The way it does one job and does it: it prohibits multiline maps, not multistatement maps. periodt π«Άβ¨
πΈ VERSION πΈ
version 0.014 β that's the version, bestie. noted and slayed π
β¨ DESCRIPTION β¨
Yes, yes β don't go nuts with map and use it to implement the complex multi-pass fnordsort algorithm. But come on, people! What's actually wrong with this:
my @localparts = map { my $addr = $_; $addr =~ s/\@.+//; $addr } @addresses;
Nothing! That's what! π
The assumption behind this module is that while the above is okay, the version below is Right Out:
my @localparts = map {
my $addr = $_;
$addr =~ s/\@.+//;
$addr
} @addresses;
Beyond the fact that it's really ugly, it's just a short step from there to a few included loop structures and then β oops! β a return statement. Seriously, people, they're called subroutines. We've had them since Perl 3. π
π§ PERL VERSION π§
This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.
Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.
π«Ά AUTHOR π«Ά
Ricardo Signes <cpan@semiotic.systems> β icon behavior, truly π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2022 by Ricardo Signes <cpan@semiotic.systems>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay that's the whole vibe check, bestie: this page is from perl v5.40.0, dated 2023-01-01, and it's the one and only Perl::C...tements(3). slay β¨π
π¦ where this page comes from
- epel 10: perl-Perl-Critic-Lax 0.014-1.el10_0 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms