Code::T...Command(3)
π Code::TidyAll::Role::RunsCommand π
okay bestie, welcome to the Code::TidyAll::Role::RunsCommand(3) page from User Contributed Perl Documentation β¨ this one is all about the role for plugins which run external commands, and we are gonna cover every little detail. no cap. π«Ά
πΈ NAME πΈ
Code::TidyAll::Role::RunsCommand β a role for plugins which run external commands π
π¦ VERSION π¦
version 0.84 β iconic, immaculate, current. β¨
π SYNOPSIS π
package Whatever;
use Moo;
with 'Code::TidyAll::Role::RunsCommand';
π DESCRIPTION π
It's a a role (yes, the original really says βa aβ twice, love that for us) for plugins which run external commands. π
π§ ATTRIBUTES π§
cmdβ the command to run. This is just the executable, bestie; it should not include additional arguments. periodt. π
π₯ METHODS π₯
_run_or_die(@argv)
This method runs the plugin's command, combining any values provided to the plugin's argv attribute with those passed to the method. π οΈ
The plugin's argv attribute is parsed with the shellwords subroutine from Text::ParseWords in order to turn the argv string into a list. This ensures that running the command does not spawn an external shell. very demure, very safe. πβ¨
The @argv passed to the command comes after the values from the argv attribute. The assumption is that this will be what passes a file or source string to the external command. π
If the command exits with a non-zero status, then this method throws an exception. The error message it throws includes the command that was run (with arguments), the exit status, any signal received by the command, and the command's output. π so if it goes wrong, you get the receipts.
Both stdout and stderr from the command are combined into a single string returned by the method. π«Ά
bestie, non-zero exit = exception thrown, not a quiet little vibe check. keep that in mind. π
_is_bad_exit_code($code)
This method returns true if the exit code is bad and false otherwise. By default all non-zero codes are bad, but some programs may be expected to exit non-0 when they encounter validation/tidying issues. π so yeah, bad exit codes are usually bad, but sometimes the program is just being dramatic for a valid reason.
π«Ά SUPPORT π«Ά
Bugs may be submitted at <https://github.com/houseabsolute/perl-code-tidyall/issues>. π go off, report that bug.
π¦ SOURCE π¦
The source code repository for Code-TidyAll can be found at <https://github.com/houseabsolute/perl-code-tidyall>. π
π AUTHORS π
- Jonathan Swartz
<swartz@pobox.com>π¦ - Dave Rolsky
<autarch@urth.org>π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011 - 2023 by Jonathan Swartz. π
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π«Ά
The full text of the license can be found in the LICENSE file included with this distribution. πβ¨
okay bye bestie π
this page is from perl v5.42.0, dated 2024-03-08, and it lives under Code::T...Command(3). periodt. π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Code-TidyAll 0.840.0-bp160.1.4 Β· 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