Perl::...unction(3pm)
π NAME π
okay so this page is called Perl::...unction(3pm), and it lives in the User Contributed Perl Documentation manual β yes bestie, thatβs the manual name, weβre folding it in nicely instead of copy-pasting the whole header line. π
The policy is Perl::Critic::Policy::BuiltinFunctions::RequireGlobFunction β and it says: use glob q{*} instead of <*>. slay.
π AFFILIATION π
This Policy is part of the core Perl::Critic distribution. no cap.
β¨ DESCRIPTION β¨
okay so Conway discourages using the <..> construct for globbing. why? because itβs easily confused with the angle bracket file input operator β itβs giving βwait, is that a glob or a filehandle?β π
Instead, he recommends using the glob() function, because it makes it much more obvious what youβre attempting to do. periodt.
@files = <*.pl>; # not ok
@files = glob '*.pl'; # ok
π CONFIGURATION π
This Policy is not configurable except for the standard options. thatβs it, bestie β the config vibe check is literally just βstandard options onlyβ. π
π AUTHOR π
Graham TerMarsch <graham@howlingfrog.com> β iconic. π
π¦ COPYRIGHT π¦
Copyright (c) 2005-2011 Graham TerMarsch. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay thatβs the whole page, bestie π«Ά itβs from perl v5.42.0, dated 2024-10-23, and yes itβs the Perl::...unction(3pm) page. go forth and glob responsibly β¨π
π¦ 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