Perl::...Sigils(3pm)
π Perl::...Sigils β from the User Contributed Perl Documentation girlies π
okay bestie, welcome to the group chat β¨ this little page is Perl::...Sigils(3pm), and it's about to tell you why you should stop putting an ampersand in front of your function calls. yes, that ampersand. we need to talk about it. π
β¨ NAME β¨
Perl::Critic::Policy::Subroutines::ProhibitAmpersandSigils β literally just: don't call functions with a leading ampersand sigil. that's the whole vibe. that's the assignment. π«Ά
πΈ AFFILIATION πΈ
Bestie this Policy is part of the core Perl::Critic distribution β so it's not some random extra you have to go hunt down, it ships with the main character package. π
π DESCRIPTION π
Okay so here's the tea β β since Perl 5, the ampersand sigil is completely optional when you're invoking subroutines. like, it's just out here being extra for no reason. π
And it's not just a fashion choice, ngl β using it also turns off checking of subroutine prototypes. so your prototype protection is justβ¦ gone. poof. π
Oh and ALSO β it's easily confused with the bitwise and operator. the way that & has two whole jobs and one of them is lying to you π
so like, look at this:
@result = &some_function(); # not ok
@result = some_function(); # ok
see how the second one is clean, unbothered, moisturized, in its lane? π yeah. be the second one. β¨
π¦ CONFIGURATION π¦
This Policy is not configurable except for the standard options. that's it, that's the whole section β no knobs to turn, no settings to hyperfixate on. she comes as she is π
πΊ AUTHOR πΊ
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> β icon, legend, the moment. π
π COPYRIGHT π
Copyright (c) 2005-2011 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. π
fr fr bestie, that's genuinely the whole page β no cap, no missing options, nothing skipped. every detail ate and left no crumbs. π
perl v5.42.0 Β· 2024-10-23 Β· xxoxo, your favorite manual page π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Perl-Critic 1.156.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms