Scroll to navigation

Code::TidyAll::Role::RunsCommand(3pm) User Contributed Perl Documentation Code::TidyAll::Role::RunsCommand(3pm)


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


version 0.83


    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.

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.

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.

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.


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


The source code repository for Code-TidyAll can be found at <>.


  • Jonathan Swartz <>
  • Dave Rolsky <>


This software is copyright (c) 2011 - 2022 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.

2022-12-31 perl v5.36.0