Test::...mdLine(3pm)
π NAME π
Test::Run::CmdLine β okay so this is the module that analyzes tests from the command line using Test::Run. That's the whole vibe. Bestie, it runs your tests and tells you what's up. β¨
π SYNOPSIS π
use Test::Run::CmdLine;
my $tester = Test::Run::CmdLine->new(
{
'test_files' => ["t/one.t", "t/two.t"],
},
);
$tester->run();
πΈ Interface Functions πΈ
π
$tester = Test::Run::CmdLine->new({'test_files' => \@test_files, ....});
Initializes a new testing front end, periodt. test_files is a named argument, and inside it lives the files you wanna test.
The other named arguments are, no cap:
backend_paramsβ a hash of named parameters that get passed along to the backend class (which is derived fromTest::Run::Obj). It's giving "here's the tea, backend, do your thing".driver_classβ this is the backend class that gets instantiated and used to do the actual processing. It defaults toTest::Run::Obj. Slay.
π $tester->run()
Actually runs the tests on the command line. That's it, that's the function. π«Ά
TODO : Write more.
(Not me writing that, that's literally in the docs. Leaving it exactly where it is. π)
π BUILD
For Moose. Yeah, that's all it says, and we're not gonna invent lore about it. π
π¦ Environment Variables π¦
These environment variables (aka %ENV, aka the group chat the shell is in) affect the behaviour of Test::Run::CmdLine:
HARNESS_COLUMNSβ this one decides the width of the terminal (it sets'Columns'inTest::Run::Obj). If you don't set it, it gets figured out from theCOLUMNSenvironment variable, which is the one your terminal normally sets for you. iykyk.HARNESS_DEBUGβ triggers the'Debug'option inTest::Run::Obj. Basically: it will print debugging info about itself while it's running the tests. Main character narrating their own life. π₯HARNESS_FILELEAK_IN_DIRβ points to a directory that's gonna be monitored. After every single test file, the module checks whether any new files showed up in that directory and reports them. Very "who left this here" energy.
It's advisable to give an absolute path here. If it's relative, it'll be relative to the current working directory at the moment "$tester->run()" was called.
HARNESS_NOTTYβ triggers the'NoTty'option inTest::Run::Obj. Meaning: it makesTest::Run::CmdLinenot treatSTDOUTlike it's a console. In that case, it won't emit those extra-frequent progress reports using carriage returns ("\r"s). Lowkey a glow-down for the progress bar, highkey useful sometimes.HARNESS_PERLβ specifies the'Test_Interpreter'variable ofTest::Run::Obj. This lets you pick a different Perl interpreter to use instead of$^X. Choose your fighter. πHARNESS_PERL_SWITCHESβ specifies the'Switches'variable ofTest::Run::Obj. This lets you pass more switches to the Perl interpreter. More flags, more fun.HARNESS_TIMERβ triggers the'Timer'option inTest::Run::Obj. What it does is make the time it took for the tests to run get displayed. Clock it. β±οΈHARNESS_VERBOSEβ triggers the'Verbose'option inTest::Run::Obj. Meaning: it emits the standard output of the test files while they're being processed. Everything, out loud, as it happens. Obsessed.
π§ Internal Functions π§
β my $args_array_ref = $tester->get_backend_args()
Calculates and retrieves the arguments for the backend class (the one that inherits from Test::Run::Obj), and hands them back as a single array reference. Currently, it appends the arguments from get_backend_env_args() onto the ones from get_backend_init_args(). Two vibes, one array.
π $self->private_backend_args()
Calculates the get_backend_args()-specific arguments for this class. Private, obviously. π
π $tester->get_backend_env_args()
Calculates the arguments for the backend class that originated from the environment (%ENV), and puts them in "$tester-"backend_env_args()>. Yeah, that's exactly how it's written, bestie, we do not touch the sacred text.
πΈ $self->private_direct_backend_env_mapping()
The return value of this method gets collected from every class, and then adapted to the direct backend environment mapping.
β¨ my $args_array_ref = $tester->get_backend_init_args()
Calculates and returns the arguments for the backend class that originated from the arguments passed to the (front-end) object from its constructor. Origin story, but for args.
π¦ $self->private_backend_plugins()
Calculates the backend plugins that are specific to this class. They get collected up to formulate a list of plugins that will be add_to_backend_plugins()'ed. Plugin roundup. π
π $self->add_to_backend_plugins($plugin)
Appends a plugin to the plugins list. Useful in front-end plug-ins. Short king of a method.
π AUTHORS π
Shlomi Fish, <http://www.shlomifish.org/> . Legend behaviour. π«Ά
π BUGS π
Please report any bugs or feature requests to "bug-test-run-cmdline@rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Run-CmdLine>. Shlomi will be notified, and then you'll automatically be notified of progress on your bug as changes get made. Full circle. Not me @-ing the maintainer, but like, do it, it's the system. β¨
π SUPPORT π
You can find documentation for this module with the perldoc command. It's giving "read the docs, bestie":
perldoc Test::Run::CmdLine
You can also look for information at:
- CPAN Ratings
<http://cpanratings.perl.org/d/Test::Run::CmdLine>
- RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test::Run::CmdLine>
- Search CPAN
<http://search.cpan.org/dist/Test::Run::CmdLine/>
π¦ SOURCE AVAILABILITY π¦
The latest source of Test::Run::CmdLine is available from the Test::Run BerliOS Subversion repository. Fresh source, straight from the source:
<https://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/>
π ACKNOWLEDGEMENTS π
Yeah bestie this section is literally empty. Nothing. A void. We're leaving it empty because that's what it is. π
π COPYRIGHT & LICENSE π
Copyright 2005 Shlomi Fish, all rights reserved.
This program is released under the MIT X11 License. Free as in, go wild but respectfully. π
And that's the whole page, bestie!! This was perl v5.42.0, dated 2025-07-25, from the Test::...mdLine(3pm) page in the User Contributed Perl Documentation. Go run some tests, you're gonna eat. π₯π
π¦ where this page comes from
- fedora 43: perl-Test-Run-CmdLine 0.0132-15.fc43 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND LicenseRef-Callaway-MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms