Test::S...n::UTF8(3)

πŸ“¦
version 1.302027 Β· 2 versions
, in fedora 43

✨ NAME ✨

Test::Stream::Plugin::UTF8 β€” bestie, it's a Test::Stream plugin that turns on utf8. That's the whole vibe. πŸ’–


πŸ’€ DEPRECATED πŸ’€

okay so this whole distribution is deprecated, no cap. It got replaced by Test2, Test2::Suite, and Test2::Workflow. RIP to a real one 😭

If you're tryna migrate, go read Test::Stream::Manual::ToTest2 β€” it's the conversion guide, it's giving helpful, it's your bestie fr fr. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

When you use this plugin, three (3) iconic things happen:

  1. it turns on the utf8 pragma ✨
  2. it sets STDERR and STDOUT to use utf8 πŸ’…
  3. it updates the Test::Stream output formatter to use utf8 πŸŽ€

that's it, that's the whole slay. πŸ‘‘


🌸 SYNOPSIS 🌸

use Test::Stream qw/... UTF8/;

This is literally the exact same thing as doing all of this yourself, by hand, like a peasant:

use Test::Stream ...;
use utf8;
BEGIN {
    set_encoding('utf8');
    binmode(STDERR, ':utf8');
    binmode(STDOUT, ':utf8');
}

same energy, way less typing. periodt. πŸ’–


⭐ NOTES ⭐

so this module sets your output handles to have the ':utf8' output layer. lowkey some people prefer ':encoding(utf-8)' instead, because it's way more strict about verifying characters. πŸ‘€

There's a whole debate about whether encoding to utf8 from perl internals can ever even fail, so honestly it might not matter at all. 🀷

This choice was also made because the alternative causes threads to segfault πŸ˜­πŸ’€ β€” like, actually. see perlbug 3193 <https://rt.perl.org/Public/Bug/Display.html?id=31923>.

bestie do NOT come for me about :encoding(utf-8), the segfaults said what they said.

🌈 SOURCE 🌈

The source code repo for Test::Stream lives at <https://github.com/Test-More/Test-Stream/> β€” go look, it's right there, it's serving. 🫢


πŸ‘‘ MAINTAINERS πŸ‘‘

  • Chad Granum <exodist@cpan.org>

πŸ’œ AUTHORS πŸ’œ

  • Chad Granum <exodist@cpan.org>

(yes bestie, same person, iconic behavior, we stan a solo act πŸŽ€)


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


and that's the whole page, bestie!! 🌸 this one's from perl v5.42.0, dated 2025-07-25, and it's the Test::S...n::UTF8(3) manpage β€” from the User Contributed Perl Documentation section, mwah, love that for us. go forth and be utf8. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from