Test::S...w::Task(3)

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

πŸ’– Test::Stream::Workflow::Task πŸ’–

okay so bestie, welcome to the User Contributed Perl Documentation page for Test::Stream::Workflow::Task(3) β€” yes that's the whole manual name, it's giving very "I live in your perldoc and I'm thriving". This is the compiled form of a unit. Let's get into it πŸŽ€


🚨 DEPRECATED 🚨

Not me having to break this to you first thing 😭 β€” this distribution is deprecated, like fully deprecated, in favor of Test2, Test2::Suite, and Test2::Workflow.

Want the glow-up guide? Check out Test::Stream::Manual::ToTest2 for a conversion guide. She's got you 🫢


⚠️ EXPERIMENTAL CODE WARNING ⚠️

"This module is still EXPERIMENTAL" β€” no cap, that's the literal quote. Test-Stream as a whole is now stable, but this particular module is still out here being experimental. You're still free to use it! Just know that it may change in backwards-incompatible ways πŸ’€ (the original says "backwords" and honestly? mood, but the meaning is backwards, bestie).

🫢 This message will be removed from this module's POD once it's considered stable. Until then: consider yourself warned, diva.

🌸 DESCRIPTION 🌸

This object is a temporary object created by a runner to process Test::Stream::Workflow::Unit objects. That's it. That's the whole vibe. It's a little helper that exists to do a job and then dip ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

Lowkey you rarely encounter a task object β€” they're mostly out here doing their thing under the hood, iykyk. But when you do get one, you usually just wanna call iterate() on it. And the cute part? You can do that by treating it as a coderef πŸ‘‘

$task->();

Or, if you wanna be direct about it:

$task->iterate();

Slay. Both paths, same destination πŸ’…


πŸ’… METHODS πŸ’…

Okay bestie, here's the full roster. Every single one, no skips, we don't do that here ✨

  • $task->run() β€” Run the task. This should only ever be done by a runner, fr fr. Not a you job. Not a me job. A runner job. πŸ™ˆ
  • $task->iterate() β€” Sometimes tasks are recursive (iconic behavior honestly). This method is how they resume running in a recursive structure. It's the "and we're back" of methods πŸŒ€
  • $task->reset() β€” Reset the task. This is rarely needed, so don't just be out here resetting things for fun.
  • $ar = $task->args() β€” Get the args that will be passed to the primary actions. The receipts, basically 🧾
  • $bool = $task->finished() β€” Check if the task has finished running. Is she done? This tells you πŸŽ€
  • $bool = $task->no_final() β€” True if the task is not required to generate events.
  • $bool = $task->should_run() β€” True if there is still work to be done. The "we're not done yet" check πŸ’ͺ
  • $bool = $task->subtest() β€” True if the task should produce a subtest. Nested vibes 🌈
  • $int = $task->events() β€” Number of events produced by the primary actions. Counting the girlies πŸ“Š
  • $int = $task->failed() β€” Number of failures produced inside the primary actions. We don't talk about those 😭
  • $int = $task->pending() β€” How many pending iterations remain. The queue of stuff still waiting to happen ⏳
  • $int = $task->stage() β€” What stage the task is in. Main character arc progression, basically πŸ‘‘
  • $msg = $task->exception() β€” If an exception has occurred, the message will be stored here. The receipts for when things went sideways πŸ’€
  • $unit = $task->unit() β€” Get the unit the task wraps. Peeling back the layers πŸ“
  • $runner = $task->runner() β€” Get the runner instance and/or class. Who's driving this thing πŸš—

πŸ”₯ SOURCE πŸ”₯

The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/. Go be nosy, bestie, it's encouraged 🫢


πŸ‘‘ MAINTAINERS πŸ‘‘

Chad Granum <exodist@cpan.org>


✨ AUTHORS ✨

Chad Granum <exodist@cpan.org>


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 was Test::Stream::Workflow::Task(3) from perl v5.42.0, dated 2025-07-25, living its life in the User Contributed Perl Documentation section. Periodt. πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from