Perl::C...yArrows(3)

πŸ“¦
version 0.010 Β· 2 versions
, in fedora 43

πŸ’… NAME πŸ’…

Perl::Critic::Policy::Tics::ProhibitManyArrows β€” bestie, it's giving (this => is => not => good). Like, at all. 🫢

Oh and hi, you're reading Perl::C...yArrows(3) from the User Contributed Perl Documentation, the little section-3 girly who is about to read you for filth about arrow spam. ✨


🌸 VERSION 🌸

version 0.010 β€” she's a baby but she's got opinions. πŸŽ€


πŸ’€ DESCRIPTION πŸ’€

Okay so, real talk. You are not clever if you do this:

my %hash = (key1=>value1=>key2=>value2=>key3=>'value3');

Ma'am. 😭 That's not a hash, that's a whole highway. And you are even more not clever if you do this:

my %hash = (key1=>value1=>key2=>value2=>key3=>value3=>);

The way that trailing => is just… sitting there… unemployed… πŸ™ˆ No cap, this is the code equivalent of sending a text that ends in "and". Not the vibe. The policy will be having words with you.


🧚 PERL VERSION 🧚

This library should run on perls released even a long time ago. She's flexible like that. ✨ 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. So don't come for her with a downgrade PR, she's not accepting applications. πŸ’…


πŸŽ€ CONFIGURATION πŸŽ€

There is one parameter for this policy, max_allowed, which specifies the maximum number of fat arrows that may appear as item separators. 🏹

The default is two. Periodt.

If you really hate the fat arrow, and never want to see it, you can set max_allowed to zero and make any occurance of "=>" illegal. Zero tolerance era. 🚫 (Yes, "occurance" β€” that's exactly how the original spells it, we don't correct the queen, we just report. 😌)

Here are some examples of code that would fail with various max_allowed values:

max_allowed    failing code
0              (foo => bar)
1              (foo => bar => baz)
2              (foo => bar => baz => quux)

So like, one arrow over the limit and it's over for you. Vibe check: failed. πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Ricardo SIGNES <cpan@semiotic.systems> β€” iconic, honestly. 🫢


This software is copyright (c) 2007 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Slay, legally speaking. πŸ’–


That's the whole page, bestie β€” brought to you by perl v5.42.0, dated 2025-07-25, under the manual name Perl::C...yArrows(3). Go forth and count your arrows. πŸŒΈβœ¨πŸ’…

πŸ“¦ where this page comes from