Test::...GplArt(3pm)
π Test::...GplArt(3pm) π
okay bestie, so this page is filed under Test::...GplArt(3pm) in the User Contributed Perl Documentation, and the actual module it's yelling about is called Test::Run::Straps. buckle up, because this one is a museum piece and we're gonna read the plaque together. π
β οΈ WARNING β οΈ
bestie. listen. π
This module contains nothing but old (and possibly out of date) documentation. Like, literally nothing else. All the code-wise functionality got moved to the MIT X11-licensed Test::Run::Straps and other modules.
So β don't use this module. π« But you may wish to consult its documentation for reference. it's giving "old diary in the attic" energy, iykyk.
β¨ SYNOPSIS β¨
use Test::Run::Straps;
my $strap = Test::Run::Straps->new;
# Various ways to interpret a test
my $results = $strap->analyze($name, \@test_output);
my $results = $strap->analyze_fh($name, $test_filehandle);
my $results = $strap->analyze_file($test_file);
# UNIMPLEMENTED
my %total = $strap->total_results;
# Altering the behavior of the strap UNIMPLEMENTED
my $verbose_output = $strap->dump_verbose();
$strap->dump_verbose_fh($output_filehandle);
heads up:total_results,dump_verboseanddump_verbose_fhare marked UNIMPLEMENTED in the source, so don't come for them, they are not coming for you. π
πΈ DESCRIPTION πΈ
THIS IS ALPHA SOFTWARE in that the interface is subject to change in incompatible ways. (translation: the vibes are stable but the API might glow up and break your code π ). It is otherwise stable.
So here's the lore: Test::Run is limited to printing out its results. Which, ngl, makes analysis of the test results difficult for anything but a human. π To make it easier for programs to work with test results, we provide Test::Run::Straps. Instead of printing the results, straps provide them as raw data. You can also configure how the tests are to be run. main character behavior honestly.
The interface is currently incomplete. Please contact the author if you'd like a feature added or something changed or you just have comments. they want the feedback fr fr π«Ά
π ANALYSIS π
π Parsing π
Methods for identifying what sort of line you're looking at. (yes that's the whole bit, it's shy)
π Results π
The %results returned from analyze() contain the following information:
passingβ true if the whole test is considered a pass (or skipped), false if its a failureexitβ the exit code of the test run, if from a filewaitβ the wait code of the test run, if from a filemaxβ total tests which should have been runseenβ total tests actually seenskip_allβ if the whole test was skipped, this will contain the reason.okβ number of tests which passed (including todo and skips)todoβ number of todo tests seenbonusβ number of todo tests which unexpectedly passedskipβ number of tests skipped
So a successful test should have max == seen == ok. periodt. π
There is one final item, the details.
detailsβ an array ref reporting the result of each test, looks like this:
$results{details}[$test_num - 1] =
{ ok => is the test considered ok?
actual_ok => did it literally say 'ok'?
name => name of the test (if any)
diagnostics => test diagnostics (if any)
type => 'skip' or 'todo' (if any)
reason => reason for the above (if any)
};
Element 0 of the details is test #1. The author tried it with element 1 being #1 and 0 being empty, and says this is less awkward. iconic decision-making tbh π
π¦ EXAMPLES π¦
See examples/mini_harness.plx for an example of use. go peek bestie, it's right there π
π AUTHOR π
Michael G Schwern "<schwern@pobox.com>", later maintained by Andy Lester "<andy@petdance.com>".
Converted to Test::Run::Straps by Shlomi Fish, <http://www.shlomifish.org/> .
π LICENSE π
This file is distributed under the same terms as perl. (GPL2 or Later + Artistic 1).
π SEE ALSO π
Test::RunTest::Run::Straps
and that's the whole page, bestie!! π
this was perl v5.42.0, dated 2025-07-25, and it lives under Test::...GplArt(3pm) in the User Contributed Perl Documentation. slay, go read Test::Run::Straps instead, mwah π«Άβ¨π
π¦ where this page comes from
- fedora 43: perl-Test-Run 0.0306-3.fc43 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-2.0-only AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms