Test2:...coding(3perl)
π NAME π
Test2::Tools::Encoding β bestie, it's the toolkit for managing the encoding of your Test2-based tests β¨
Okay so real talk, in the docs this page lives at Test2:...coding(3perl) in the Perl Programmers Reference Guide, and it's the section-3perl manual page you want when your test output is givingβ¦ mojibake π
πΈ DESCRIPTION πΈ
This module exports a function that lets you dynamically change the output encoding at will. Like, whenever. On the fly. Mid-run. Whenever you feel like it, no cap π
That's genuinely the whole vibe of this module β one function, immaculate energy, does exactly one thing and slays at it π
β¨ SYNOPSIS β¨
use Test2::Tools::Encoding;
set_encoding('utf8');
See? Two lines. Iconic. The way that it just works π¦
π EXPORTS π
All subs are exported by default β so you don't have to ask nicely, they're just there π«Ά
set_encoding($encoding)β this sets the encoding to whatever you specify. Lowkey important caveat though: this will only affect the output of the current formatter, which is usually your TAP output formatter. So don't come for other formatters, they did not consent to this glow-up π
π SOURCE π
The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/. Go forth and star it, bestie β
π MAINTAINERS π
Chad Granum <exodist@cpan.org> β the main character maintaining all of this fr fr π
π AUTHORS π
Chad Granum <exodist@cpan.org> β yes, same legend, both hats, we love a multitasker π
π 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.
See http://dev.perl.org/licenses/
Friendly reminder bestie: it's free software under the same terms as Perl itself, so share the love, not a lawsuit π«Ά
Mwah π that was perl v5.44.0, dated 2026-10-17, and the Test2:...coding(3perl) page. Go encode something gorgeous β¨π¦πΈ
π¦ 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