1Code::TidyAll::Role::RuUnsseCromCmoanntdr(i3b)uted PerlCDoodceu:m:eTnitdaytAiloln::Role::RunsCommand(3)
2
3
4

NAME

6       Code::TidyAll::Role::RunsCommand - A role for plugins which run
7       external commands
8

VERSION

10       version 0.75
11

SYNOPSIS

13           package Whatever;
14           use Moo;
15           with 'Code::TidyAll::Role::RunsCommand';
16

DESCRIPTION

18       This is a a role for plugins which run external commands
19

ATTRIBUTES

21       cmd The command to run. This is just the executable and should not
22           include additional arguments.
23

METHODS

25   _run_or_die(@argv)
26       This method run the plugin's command, combining any values provided to
27       the plugin's "argv" attribute with those passed to the method.
28
29       The plugin's "argv" attribute is parsed with the "shellwords"
30       subroutine from Text::ParseWords in order to turn the "argv" string
31       into a list. This ensures that running the command does not spawn an
32       external shell.
33
34       The @argv passed to the command comes after the values from "argv"
35       attribute. The assumption is that this will be what passes a file or
36       source string to the external command.
37
38       If the command exits with a non-zero status, then this method throws an
39       exception. The error message it throws include the command that was run
40       (with arguments), the exit status, any signal received by the command,
41       and the command's output.
42
43       Both "stdout" and "stderr" from the command are combined into a single
44       string returned by the method.
45
46   _is_bad_exit_code($code)
47       This method returns true if the exit code is bad and false otherwise.
48       By default all non-zero codes are bad, but some programs may be
49       expected to exit non-0 when they encounter validation/tidying issues.
50

SUPPORT

52       Bugs may be submitted at
53       <https://github.com/houseabsolute/perl-code-tidyall/issues>.
54
55       I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
56

SOURCE

58       The source code repository for Code-TidyAll can be found at
59       <https://github.com/houseabsolute/perl-code-tidyall>.
60

AUTHORS

62       ·   Jonathan Swartz <swartz@pobox.com>
63
64       ·   Dave Rolsky <autarch@urth.org>
65
67       This software is copyright (c) 2011 - 2019 by Jonathan Swartz.
68
69       This is free software; you can redistribute it and/or modify it under
70       the same terms as the Perl 5 programming language system itself.
71
72       The full text of the license can be found in the LICENSE file included
73       with this distribution.
74
75
76
77perl v5.30.1                      2020-01-29Code::TidyAll::Role::RunsCommand(3)
Impressum