Test::Run::CmdLine - Analyze tests from the command line using Test::Run


    use Test::Run::CmdLine;

    my $tester = Test::Run::CmdLine->new(
            'test_files' => ["t/one.t", "t/two.t"],


Interface Functions

$tester = Test::Run::CmdLine->new({'test_files' => \@test_files, ....});

Initializes a new testing front end. test_files is a named argument that contains the files to test.

Other named arguments are:


This is a hash of named parameters to be passed to the backend class (derived from Test::Run::Obj.)


This is the backend class that will be instantiated and used to perform the processing. Defaults to Test::Run::Obj.


Actually runs the tests on the command line.

TODO : Write more.


For Moose.

Environment Variables

The following environment variables (%ENV) affect the behaviour of Test::Run::CmdLine:


This determines the width of the terminal (sets 'Columns') in Test::Run::Obj). If not specified, it will be determined according to the COLUMNS environment variable, that is normally specified by the terminal.


Triggers the 'Debug' option in Test::Run::Obj. Meaning, it will print debugging information about itself as it runs the tests.


This variable points to a directory that will be monitored. After each test file, the module will check if new files appeared in the direcotry and report them.

It is advisable to give an absolute path here. If it is relative, it would be relative to the current working directory when $tester->run() was called.


Triggers the 'NoTty' option in Test::Run::Obj. Meaning, it causes Test::Run::CmdLine not to treat STDOUT as if it were a console. In this case, it will not emit more frequent progress reports using carriage returns ("\r"s).


Specifies the 'Test_Interpreter' variable of Test::Run::Obj. This allows specifying a different Perl interprter to use besides $^X.


Specifies the 'Switches' variable of Test::Run::Obj. This allows specifying more switches to the Perl interpreter.


This variable triggers the 'Timer' option in Test::Run::Obj. What it does is causes the time that took for tests to run to be displayed.


Triggers the 'Verbose' option in Test::Run::Obj. Meaning, it emits the standard output of the test files while they are processed.

Internal Functions

my $args_array_ref = $tester->get_backend_args()

Calculate and retrieve the arguments for the backend class (that inherits from Test::Run::Obj) as a single array reference. Currently it appends the arguments of get_backend_env_args() to that of get_backend_init_args().


Calculates the get_backend_args()-specific arguments for this class.


Calculate the arguments for the backend class, that originated from the environment (%ENV), and puts them in $tester-backend_env_args()>


The return value of this method is collected from every class, and adapted to the direct backend environment mapping.

my $args_array_ref = $tester->get_backend_init_args()

Calculate and return the arguments for the backend class, that originated from the arguments passed to the (front-end) object from its constructor.


Calculates the backend plugins specific for this class. They will be collected to formulate a list of plugins that will be add_to_backend_plugins()'ed.


Appends a plugin to the plugins list. Useful in front-end plug-ins.


Shlomi Fish, .


Please report any bugs or feature requests to, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc Test::Run::CmdLine

You can also look for information at:


The latest source of Test::Run::CmdLine is available from the Test::Run BerliOS Subversion repository:



Copyright 2005 Shlomi Fish, all rights reserved.

This program is released under the MIT X11 License.