Test::S...:Bundle(3)
π NAME π
Test::Stream::Bundle β bestie, it's a lil toolkit that helps you write your own custom bundles. That's the whole vibe. β¨
π« DEPRECATED π«
Okay so real talk, this whole distribution is DEPRECATED. It's been benched in favor of Test2, Test2::Suite, and Test2::Workflow. π
If you need to make the jump, there's a conversion guide waiting for you at Test::Stream::Manual::ToTest2. Go read it, it's giving helpful. π«Ά
πΈ DESCRIPTION πΈ
So here's the tea: writing a bundle is how you cut down on all that boilerplate you keep copy-pasting everywhere. A bundle is literally just a set of plugins that all get loaded at once, exactly to your specifications. One line, whole squad of plugins, done. Iconic behavior honestly. π
β¨ SYNOPSIS β¨
package Test::Stream::Bundle::MyBundle;
use strict;
use warnings;
# Gives us an 'import' method that allows this module to be used directly
# if desired.
use Test::Stream::Bundle qw/import/;
sub plugins {
return (
qw{
IPC
TAP
ExitSummary
Core
Context
Exception
Warnings
Compare
Mock
},
);
}
Look at that. Nine plugins, one sub plugins, zero stress. Chef's kiss. π
π EXPORTS π
$class->import()β okay so thisimport()method is what gets called when your plugin is used directly, likeuse Test::Stream::Bundle::MyBundle. When that happens, it loads up all the specified plugins for you. Automatic. Slay. π¦
π EXPECTED METHODS π
@list = $class->plugins()β yourplugins()method should return a list of plugins to load. That's the main gig. But wait, there's more: it can also return coderefs, and those coderefs get run with the original caller arrayref as their only argument. β¨
sub plugins {
return (
qw/Core TAP .../,
sub {
my $caller = shift;
# Package, file, and line that requested the bundle be used.
my ($pkg, $file, $line) = @$caller;
...
},
);
}
Not me handing you the caller's package, file, and line like a little gift. π You literally know exactly who asked for the bundle and where from. Main character energy fr fr. π
π SOURCE π
The source code repository for Test::Stream lives at http://github.com/Test-More/Test-Stream/. Go star it bestie. β
π«Ά MAINTAINERS π«Ά
Chad Granum <exodist@cpan.org>
π AUTHORS π
Chad Granum <exodist@cpan.org>
π COPYRIGHT π
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, no cap. π This one came from the User Contributed Perl Documentation collection and it's tagged perl v5.42.0, dated 2025-07-25 β so yeah, shoutout to that exact version and that exact day for bringing us this page. π«Ά Stay deprecated-but-fabulous, babe. π
π¦ where this page comes from
- fedora 43: perl-Test-Stream 1.302027-35.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms