Test::S...n::Class(3)
π Test::Stream::Plugin::Class π
okay so bestie, welcome to the manual page for Test::Stream::Plugin::Class β a lil User Contributed Perl Documentation moment (yes, it lives in the Test::S...n::Class(3) slot, that's just the truncated vibe of the name, don't panic). Sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
Test::Stream::Plugin::Class β it's the plugin that loads the package you're testing and gives you cute lil aliases so you don't have to keep typing the whole name. iconic behaviour honestly π
π DEPRECATED π
okay so we have to have a serious moment. no cap, this distribution is deprecated. it's been retired in favor of Test2, Test2::Suite, and Test2::Workflow. rip to a real one π«Ά
if you need to make the switch, there's a whole conversion guide waiting for you over at Test::Stream::Manual::ToTest2. go read it, bestie, your future self will thank you.
πΈ DESCRIPTION πΈ
so here's the tea: this plugin lets you designate a class as THE class you are testing. like, you point at it, and the plugin will:
- load that class for you π¦
- hand you shortcuts for accessing it π
and the plot twist? other plugins can also make use of the exports, so they get to be smarter too. teamwork makes the dream work fr fr β¨
π¦ SYNOPSIS π¦
look at this beautiful little code moment:
use Test::Stream Class => ['Package::You::Are::Testing'];
# You can access the class name using either the $CLASS variable, or the
# CLASS() function.
can_ok(CLASS(), qr/foo bar/);
isa_ok($CLASS, 'Package::Parent');
the way you get the class name two whole ways β either the $CLASS variable or the CLASS() function. not me being obsessed with options ππ
π EXPORTS π
here's what you get handed when you use this plugin:
$class = CLASS()β this function returns the class name. simple. elegant. slay.$CLASSβ this package variable contains the class name. it's giving main character energy in variable form π
π₯ SOURCE π₯
the source code repository for Test::Stream lives right here, bestie:
http://github.com/Test-More/Test-Stream/
go forth and browse π
π 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/
quick vibe check: all the license stuff above is real and matters β don't skip it just because it's at the bottom of the page π
and that's the whole page, bestie! π this was Test::S...n::Class(3), coming to you from perl v5.42.0, dated 2025-07-25, part of the User Contributed Perl Documentation collection. mwah, take care of yourself and your test suites π«Άβ¨
π¦ 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