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 πŸ’œ

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