Test2:...OnFail(3perl)
π NAME π
Test2::Plugin::DieOnFail β bestie, this one makes your test suite automatically die on the first test failure. No cap.
β¨ DESCRIPTION β¨
okay so here's the vibe π¦: this module will die right after the first test failure. like, the moment something goes wrong, it's over. That means your tests stop continuing β no zombie test run limping along pretending everything's fine when it is NOT π.
The exception gets thrown when the context is released, which is a fancy way of saying it runs when the test function you're using β like ok() β returns. And the reason for that timing?? It gives the tools the ability to output any extra diagnostics they may need. thoughtful queen behavior tbh πβ¨
πΈ SYNOPSIS πΈ
use Test2::V1;
use Test2::Plugin::DieOnFail;
T2->ok(1, "pass");
T2->ok(0, "fail");
T2->ok(1, "Will not run");
notice how that last one says "Will not run"?? yeah. that's the whole plot. the first fail ends the show π
π₯ SOURCE π₯
The source code repository for Test2-Suite can be found at:
https://github.com/Test-More/test-more/
go poke around, the source is right there, iykyk π
π MAINTAINERS π
- Chad Granum
<exodist@cpan.org>
π AUTHORS π
- Chad Granum
<exodist@cpan.org>
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. fr fr, free as in freedom ποΈβ¨
See http://dev.perl.org/licenses/
shoutout to perl v5.44.0, dated 2026-10-17 β that's the version and date this page came from, slay π bye bestie, go write tests that actually fail loudly π«Άπ
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms