Perl::C...allback(3)
π NAME π
okay so picture this: you're looking at Perl::C...allback(3) β a User Contributed Perl Documentation page, no cap β and the actual policy it's about is Perl::Critic::Policy::Lax::ProhibitEmptyQuotes::ExceptAsFallback. Its whole thing? Empty quotes are okay as the fallback on the rhs of ||. Periodt. π
π VERSION π
version 0.014 β tiny but iconic. β¨
πΈ DESCRIPTION πΈ
bestie, ngl, "" can be confusing when it's crammed into the middle of a big list of values. A bunch of spaces is even worse, lowkey a jump scare. But it's really common to write this code to get a default, false, defined string:
my $value = $got || '';
It's got a certain charm about it that just isn't manifested by these:
my $value = $got || $EMPTY;
my $value = $got || q{};
This policy prohibits all-whitespace strings constructed by single or double quotes, except for the empty string when it follows the high-precedence "or" or "defined or" operators. π
πͺ PERL VERSION πͺ
This library should run on perls released even a long time ago β fr fr. 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> β the author, the main character. β¨
π 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 page, bestie. this was Perl::C...allback(3) from perl v5.40.0, dated 2023-01-01. slay and happy hacking! πβ¨
π¦ 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