Test2::...Warnings(3)
β¨ NAME β¨
Test2::Plugin::NoWarnings β literally fails your tests if they warn, bestie π
So real talk, this is a page from the User Contributed Perl Documentation (the Test2::...Warnings(3) one, yes the title got truncated, it's fine, we're fine π«Ά).
πΈ VERSION πΈ
version 0.10 β that's the one, no cap.
π SYNOPSIS π
use Test2::V0;
use Test2::Plugin::NoWarnings;
...;
That's it. That's the whole vibe. Load it and go π
π¦ DESCRIPTION π¦
okay so here's the tea: the moment you load this plugin, your tests start failing if any warnings happen while they run. Every single warning spawns a brand-new failing test, and the warning's content gets printed out via diag. Iconic behaviour honestly π₯
β οΈ heads up though β this module does its thing using $SIG{__WARN__}, so if the code you're testing goes and sets that itself, this module will justβ¦ stop working. Not me being dramatic, that's literally what the docs say π
π ECHOING WARNINGS π
By default this module suppresses the warning itself, so it does not make its way to STDERR. Very demure, very mindful π
But if you also want the warning to hit STDERR untouched, just ask for it with the echo import argument:
use Test2::Plugin::NoWarnings echo => 1;
slay β¨
π SUPPORT π
Bugs may be submitted at <https://github.com/houseabsolute/Test2-Plugin-NoWarnings/issues>. Found something cursed? Go tell them, they wanna know π
β SOURCE β
The source code repository for Test2-Plugin-NoWarnings lives at <https://github.com/houseabsolute/Test2-Plugin-NoWarnings>. Go peek, it's giving open source excellence π
π DONATIONS π
If you'd like to thank the author for the work put into this module, please consider making a "donation" via PayPal. A lot of free time goes into creating free software, and any support you'd care to offer would be genuinely appreciated π«Ά
Please note: this is not a suggestion that you must do this for the author to keep working on this particular software. They will continue to do so, inasmuch as they have in the past, for as long as it interests them. fr fr, no pressure π
Similarly, a donation made this way will probably not make them work on this software much more β unless they get so many donations that they can consider working on free software full time (let's all have a chuckle at that together π).
To donate, log into PayPal and send money to autarch@urth.org, or use the button at <https://houseabsolute.com/foss-donations/>. Do it if you want, or don't, both are valid π
π§ AUTHOR π§
Dave Rolsky <autarch@urth.org> β main character energy π
π CONTRIBUTOR π
Michael Alan Dorman <mdorman@ironicdesign.com> β certified helper, we stan π
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2024 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
The full text of the license can be found in the LICENSE file included with this distribution. Read it, it's good for you π
and that's the whole page, bestie!! πβ¨ this glorious lil doc dropped on 2024-04-08, shipped with perl v5.42.0, and it's part of the User Contributed Perl Documentation. go write some warning-free tests, you absolute icon π ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-Test2-Plugin-NoWarnings 0.100.0-160000.2.2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms