Test::S...ception(3)
β¨ NAME β¨
Test::Stream::Event::Exception β the exception event, bestie π
It lives in the Test::Stream::Event::Exception family and it's literally just the event that shows up when stuff breaks. That's it. That's the whole vibe. π«Ά
π DEPRECATED π
okay so first things first, and I need you to hear me on this one:
This distribution is DEPRECATED. Not like "old and quirky" deprecated, like actually deprecated. It got replaced by Test2, Test2::Suite, and Test2::Workflow. π
If you're sitting here like "wait, how do I move my whole thing over to the new hotness," there's a whole conversion guide waiting for you: see Test::Stream::Manual::ToTest2. Go read it, it's giving helpful. πβ¨
πΈ DESCRIPTION πΈ
So when an exception event happens, two things go down, and both of them are kind of a big deal:
- It will display to
STDERRβ like, out loud, in your terminal, for everyone to see. π - It will prevent the overall test file from passing. Not just the one test. The whole file. The vibe check has been failed. π
π¦ SYNOPSIS π¦
here's the moment you've been waiting for, the actual code, no cap:
use Test::Stream::Context qw/context/;
use Test::Stream::Event::Exception;
my $ctx = context();
my $event = $ctx->send_event('Exception', error => 'Stuff is broken');
see how it's just... 'Stuff is broken'? iconic. raw. honest. π
π METHODS π
It inherits from Test::Stream::Event (so everything that one can do, this one can do too β generational talent fr fr). On top of that, it also defines this one:
$reason = $e->errorβ this hands you back the reason for the exception. like, the actual why. the lore. the backstory. π
π₯ SOURCE π₯
Wanna go look at the actual source code? Respect. The repo for Test::Stream lives right here:
http://github.com/Test-More/Test-Stream/
go forth and scroll, bestie. π§
π MAINTAINERS π
- Chad Granum
<exodist@cpan.org>
π AUTHORS π
- Chad Granum
<exodist@cpan.org>
(yes it's the same person in both lists, and honestly? that's main character energy. one legend carrying the whole thing. πβ¨)
π COPYRIGHT π
Copyright 2015 Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
okay that's the whole page, no skips, no skimming, every single flag and name and email preserved exactly as the ancestors intended π«Ά
this has been Test::Stream::Event::Exception from perl v5.42.0, 2025-07-25, as documented under Test::S...ception(3) β mwah, bye bestie! πππ¦
π¦ where this page comes from
- fedora 43: perl-Test-Stream 1.302027-35.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms