Code::TidyAll::Role::RunsCommand - A role for plugins which run external commands
version 0.76
package Whatever; use Moo; with 'Code::TidyAll::Role::RunsCommand';
This is a a role for plugins which run external commands
The command to run. This is just the executable and should not include additional arguments.
This method run the plugin's command, combining any values provided to the plugin's argv attribute with those passed to the method.
argv
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.
shellwords
The @argv passed to the command comes after the values from argv attribute. The assumption is that this will be what passes a file or source string to the external command.
@argv
If the command exits with a non-zero status, then this method throws an exception. The error message it throws include the command that was run (with arguments), the exit status, any signal received by the command, and the command's output.
Both stdout and stderr from the command are combined into a single string returned by the method.
stdout
stderr
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.
Bugs may be submitted at https://github.com/houseabsolute/perl-code-tidyall/issues.
I am also usually active on IRC as 'autarch' on irc://irc.perl.org.
irc://irc.perl.org
The source code repository for Code-TidyAll can be found at https://github.com/houseabsolute/perl-code-tidyall.
Jonathan Swartz <swartz@pobox.com>
Dave Rolsky <autarch@urth.org>
This software is copyright (c) 2011 - 2019 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.
To install Code::TidyAll, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Code::TidyAll
CPAN shell
perl -MCPAN -e shell install Code::TidyAll
For more information on module installation, please visit the detailed CPAN module installation guide.