Test::...:Straps(3pm)
π Test::...:Straps(3pm) β the vibe π
okay bestie, listen up π this is the manual page for Test::...:Straps(3pm) β that's the name sitting at the top of the page, and yes we're keeping it exactly like that, tyvm. It's shipped as part of the User Contributed Perl Documentation, so you know it's a whole community moment. π
πΈ NAME πΈ
Test::Run::Straps β analyse the test results by using TAP::Parser. That's it, that's the job, and honestly? It eats. π₯
β¨ METHODS β¨
π¦ my $strap = Test::Run::Straps->new();
Spawns you a brand-new strap. Fresh out the box, no cap. β¨
π $strap->_inc_seen_header()
Bumps up the _seen_header field by one. Test::Run::Core is the one calling it, so if that's not you, don't worry about it, bestie. π«Ά
π $self->_handle_event()
This one handles whatever the current event is, going down the list of types in the cascade. It vibe-checks every single type, and if one matches, it calls the matching _handle_${type}_event callback. And then β iconically β it returns the type of the event that matched. π
β my $results = $self->analyze( $name, \@output_lines)
Analyses the output @output_lines of a given test, and that test gets the name $name assigned to it. Returns $results β the results of the test, which is an object of type Test::Run::Straps::StrapsTotalsObj. π«Ά
heads up bestie: @output_lines should be the output of the test including newlines. Don't be out here stripping them, okay? π
π $strap->analyze_fh()
Analyses a TAP stream, and it does it based on the TAP::Parser you get from $self->_create_parser(). Main character energy, honestly. π
π§ $strap->analyze_file($filename)
Runs the program file $filename and analyses it. It'll also use it as the name in the final report, so it's doing double duty and slaying both. π
π $strap->_filtered_INC(\@inc)
Filters @inc so it'll actually fit inside the environment of some operating systems that limit it β such as VMS. We're being considerate of the elders. π
π [@filtered] = $strap->_clean_switches(\@switches)
Hands you back the switches you gave it, all trimmed and blank-filtered. Bye bye, empty strings. β¨
π $self->_command()
Returns the command β that's the command-line executable β that will run the test, alongside _switches(). π«Ά
Normally it returns $^X, but you can over-ride that using the Test_Interpreter accessor.
And lowkey the best part: this method can be over-rided in custom test harnesses so you can run using different TAP producers than Perl. Not-Perl TAP producers, we see you. π
πΈ $strap->_restore_PERL5LIB()
Puts the old value of PERL5LIB back where it belongs. This is necessary on VMS. On other platforms? It literally does nothing. Nada. Zero. π
β $self->_reset_file_state()
Resets a few fields so the strap is ready to process the next file. Glow-up, but make it internal state. β¨
π $self->_switches()
Calculates the switches needed to run the test, and returns them. Math, but make it test-running. π₯
π¦ local $ENV{PERL5LIB} = $self->_INC2PERL5LIB()
Takes the calculated library paths used for running the test scripts and hands them back in a form you can actually assign to the PERL5LIB environment variable. That's the whole point of the thing. π
π LICENSE π
This file is licensed under the MIT X11 License: π
http://www.opensource.org/licenses/mit-license.php
π AUTHOR π
Shlomi Fish, <http://www.shlomifish.org/> . π
and that's the page, bestie π«Ά this whole thing was rendered by perl v5.42.0 on 2025-07-25, and the footer was repping Test::...:Straps(3pm) the whole time. periodt. π
β¨π
π¦ 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