Test::...mdLine(3pm)

πŸ“¦
version 0.0132 Β· 2 versions
, in fedora 43

πŸ’– 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 from Test::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 to Test::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' in Test::Run::Obj). If you don't set it, it gets figured out from the COLUMNS environment variable, which is the one your terminal normally sets for you. iykyk.
  • HARNESS_DEBUG β€” triggers the 'Debug' option in Test::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 in Test::Run::Obj. Meaning: it makes Test::Run::CmdLine not treat STDOUT like 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 of Test::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 of Test::Run::Obj. This lets you pass more switches to the Perl interpreter. More flags, more fun.
  • HARNESS_TIMER β€” triggers the 'Timer' option in Test::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 in Test::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 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