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 (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