Test::S...redTests(3)

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

πŸ’– Test::Stream::DeferredTests πŸ’–

okay bestie, so this is Test::Stream::DeferredTests, part of the User Contributed Perl Documentation situation. Sit down, hydrate, and let's talk about writing tests that get executaed β€” yes, the original really spells it like that, and honestly? iconic. we're keeping the energy. 🫢


🌸 NAME 🌸

Test::Stream::DeferredTests β€” write tests that get executaed at a later time. yes. later. not now. patience, queen. ⏳✨


πŸ’€ DEPRECATED πŸ’€

ngl this whole distribution is deprecated, no cap. it's been retired in favor of Test2, Test2::Suite, and Test2::Workflow. those are the main characters now.

there's a conversion guide waiting for you at Test::Stream::Manual::ToTest2 if you need to migrate. go, glow up, move on. πŸ¦‹


✨ DESCRIPTION ✨

so here's the vibe: sometimes you gotta test things BEFORE you load Test::Stream. yeah. before. this module lets you do exactly that. πŸŽ€

you write your tests, and then they run later, after Test::Stream is loaded. you just tell it which test function to run and what arguments to hand it. the function name and the arguments get stored to be executed later. when you're ready, run do_def() to kick them off once the functions actually exist. periodt. πŸ’…


🌈 SYNOPSIS 🌈

use strict;
use warnings;

use Test::Stream::DeferredTests;

BEGIN {
    def ok => (1, 'pass');
    def is => ('foo', 'foo', 'runs is');
    ...
}

use Test::Stream qw/Core/;

do_def(); # Run the tests

# Declare some more tests to run later:
def ok => (1, "another pass");
...

do_def(); # run the new tests

done_testing;

like… you can just keep queuing them up. the audacity. the range. πŸ‘‘


🎁 EXPORTS 🎁

  • def function => @args; β€” this stores the function name plus the arguments so they can be run later. quick heads up bestie: each package has its own separate store of tests to run. so don't go thinking one package's stash is another package's stash. πŸ™ˆ
  • do_def() β€” this runs all the stored tests. and it also resets the list back to empty, so you can add even more tests to run later. it's giving infinite possibilities. πŸ”₯

πŸ“š SOURCE πŸ“š

the source code repo for Test::Stream lives at http://github.com/Test-More/Test-Stream/. go lurk, go contribute, go be nosy. 🧚


πŸ‘‘ 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/


fr fr, that's the whole page. everything's here, nothing got left on read. πŸ’–

and that's a wrap, bestie β€” this was perl v5.42.0, dated 2025-07-25, and yes, the header does the little Test::S...redTests(3) truncation thing because life is short and man page headers are shorter. slay. πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from