Test::...:Output(3pm)

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

πŸ’– Test::Run::Output πŸ’–

okay bestie, so this is Test::Run::Output β€” it's the base class for outputting messages to the user in a test harness. yes, the literal mothership of "hey bestie here's what's happening in your tests" energy. it lives in the Perl User Contributed Perl Documentation, and it's giving foundation. it's giving blueprint. periodt. πŸŽ€


✨ METHODS ✨

🌸 BUILD

for Moose. that's it, that's the whole thing β€” it's the Moose constructor hook, it does its Moose thing, we love that for it. πŸ’…

πŸ¦‹ $self->print_message($msg)

emits $msg followed by a newline. iconic behaviour honestly, it just says the thing and then hits enter. πŸ’Œ

🌈 $self->print_ml($msg)

if ml() is defined, print it and $msg. if not β€” do nothing. not me being a whole vibe gatekeeper 😭 it's like, if there's no ml, we simply don't speak. silence is also a response. πŸ’€

πŸ‘‘ $self->print_leader({filename => $filename, width => $width})

prints the file leader for $filename and $width. that's the little t/foo....... intro thing, if you're wondering β€” and you should be wondering, because the next one explains it. slay. ✨

🫢 $self->print_ml_less($msg)

calls print_ml() with $msg every second or less. so it's like, throttled. rate-limited. it's the "bestie pls don't spam the terminal" method and honestly? self-care. πŸ’–

🧚 _mk_leader

my($leader, $ml) = $self->_mk_leader($test_file, $width);

generates the t/foo........ leader for the given $test_file, plus a similar version which will overwrite the current line (by use of \r and such). the $ml may be empty if Test::Run doesn't think you're on a TTY β€” so like, no terminal, no fancy line-rewriting magic, no cap. πŸ¦‹

the $width is the width of the "yada/blah.." string. πŸŽ€


πŸ’œ AUTHOR πŸ’œ

Shlomi Fish, <http://www.shlomifish.org/> β€” the mastermind, the moment, the main character. πŸ‘‘


πŸ“œ LICENSE πŸ“œ

this file is licensed under the MIT X11 License:

http://www.opensource.org/licenses/mit-license.php

legal stuff bestie, pls read it, it's short and it ate fr fr. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

  • Test::Run::Obj
  • Test::Run::Core
  • Test::Run::Plugin::CmdLine::Output

go read those next, they're the rest of the friend group. iykyk. 🌟


and that's the whole page!! this was perl v5.42.0, dated 2025-07-25, and it's the Test::...:Output(3pm) manpage β€” mwah, tysm for reading, you're doing amazing sweetie πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from