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