Test::S...pWithout(3)

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

πŸ’– Test::S...pWithout(3) πŸ’–

okay bestie, welcome to the Test::S...pWithout(3) page β€” yeah that's the truncated name, the real one is Test::Stream::Plugin::SkipWithout, and it lives in the User Contributed Perl Documentation section of your manual. pull up a chair 🫢


✨ NAME ✨

Test::Stream::Plugin::SkipWithout β€” it's a plugin that skips your tests when certain package requirements aren't met. that's it, that's the whole vibe. πŸŽ€


πŸ’€ DEPRECATED πŸ’€

ngl this is the part where I hold your hand. this distribution is deprecated, fr fr. it got replaced by:

  • Test2
  • Test2::Suite
  • Test2::Workflow

if you need to migrate, go read Test::Stream::Manual::ToTest2 β€” that's the conversion guide, it'll walk you through it. πŸ¦‹


🌸 DESCRIPTION 🌸

so here's the situation. sometimes you've got tests that are nice to run but they depend on tools that might just… not be there? 😭 instead of adding the tool as a dep, or making the test always skip (boring), the move is to make the test run conditionally. this package is the girl who makes that possible. πŸ’…

this module is modeled after Test::Requires. it even stole most of the syntax β€” iconic behavior, we love a borrow. the difference is that this module is based on Test::Stream directly, and does not go through Test::Builder.

another difference, and this one is intentional so don't come for me: the packages you check for are not imported into your namespace for you. you do that yourself. main character energy, you get full control. πŸ‘‘


✨ SYNOPSIS ✨

use Test::Stream SkipWithout => [
    'v5.10',                 # minimum perl version
    'Necessary::Package',    # We need this, we do not care what version it is

    # A hashref can be used to specify modules + minimum versions
    {
        'Scalar::Util' => '1.3',    # We need at least this version of Scalar::Util
        'Some::Tool'   => '2.5',    # We need version 2.5 of Some::Tool
    },
];

# The tools and features are not imported for us, so we import them here.
# This gives us control over the import arguments as well.
use v5.10;
use Necessary::Package qw/foo bar/;
use Scalar::Util qw/blessed reftype/;
use Some::Tool qw/do_it/;

see how we do the imports ourselves after? that's the whole point bestie, you pick the import args. no surprises. πŸ’–


πŸ”₯ SOURCE πŸ”₯

the source code repo for Test::Stream is right here:

http://github.com/Test-More/Test-Stream/

go look, it's giving open source. 🌈


πŸ‘‘ MAINTAINERS πŸ‘‘

  • Chad Granum <exodist@cpan.org>

πŸ’œ AUTHORS πŸ’œ

  • Chad Granum <exodist@cpan.org>

(yes bestie, same name in both sections, that's just how it is, no cap)


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 page!! πŸŒΈπŸ¦‹πŸ’…

k bye bestie β€” this was Test::S...pWithout(3) from perl v5.42.0, dated 2025-07-25. stay slaying, and remember: skip the test, not the vibe. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from