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 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