Perl::...Command(3pm)

πŸ’… Perl::Critic::Command(3pm) β€” guts of perlcritic

okay so this is a User Contributed Perl Documentation page, the module is literally called Perl::Critic::Command, and bestie, it is the guts of perlcritic. that's the whole vibe. 🫢


✨ NAME ✨

Perl::Critic::Command β€” Guts of perlcritic. slay, that's it, that's the name. πŸ‘‘


🌸 SYNOPSIS 🌸

like, here's how you'd actually use it:

use Perl::Critic::Command qw< run >;

local @ARGV = qw< --statistics-only lib bin >;
run();

see how we localized @ARGV first? main character energy. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so real talk: this module is the implementation of the perlcritic command. the whole point is you can use it to run the command without going through a command interpreter. no shell, no middleman, just vibes and Perl. ✨


πŸ”₯ INTERFACE SUPPORT πŸ”₯

this is considered to be a public class. πŸ’š

but lowkey its interface is experimental, and it will likely change. so like… don't get attached? ngl it's giving "we're still figuring out our aesthetic". 😭

πŸ’œ IMPORTABLE SUBROUTINES πŸ’œ

run()

does the equivalent of the perlcritic command. πŸ’…

but bestie, unfortunately, at present, this doesn't take any parameters β€” it uses @ARGV to get its input instead. so it's reading your global args like it owns the place. πŸ™ˆ

count on this changing; don't count on the current interface. fr fr. 🫢


🌈 TO DO 🌈

the glow-up list, we love a roadmap:

  • make run() take parameters. the equivalent of @ARGV should be passed as a reference. 🎯
  • turn this into an object. periodt. 🧚

⭐ AUTHOR ⭐

Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> β€” icon. πŸ‘‘


Copyright (c) 2005-2023 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. πŸ“


πŸ’Œ cute little sign-off: this page came to you courtesy of perl v5.42.0, dated 2024-10-23, and it's the Perl::...Command(3pm) page. go forth and lint, bestie. πŸ¦‹βœ¨
πŸ“¦ where this page comes from