Test::S...:Classic(3)
π NAME
okay so this is the manual page for Test::Stream::Plugin::Classic β it's a User Contributed Perl Documentation page, bestie, and it's here to give you the Classing (Test::More) style is and is_deeply. yes. that's the whole vibe. π
π DEPRECATED
girl. stop. put the keyboard down. This distribution is deprecated in favor ofTest2,Test2::Suite, andTest2::Workflow. it's giving "still works but we're moving on."
there's a conversion guide waiting for you at Test::Stream::Manual::ToTest2 if you wanna make the jump. π¦
β¨ DESCRIPTION
this plugin hands you is() and is_deeply() functions that behave close to the way they did back in Test::More β unlike the Test::Stream::Plugin::Compare plugin, which enhanced them. or ruined them. depends who you ask, and honestly the discourse is real. π
πΈ SYNOPSIS
use Test::Stream 'Classic';
is($got, $expect, "these are the same when stringified");
isnt($got, $unexpect, "these are not the same when stringified");
like($got, qr/.../, "'got' matches the pattern");
unlike($got, qr/.../, "'got' does not match the pattern");
is_deeply($got, $expect, "These structures are same when checked deeply");
π«Ά EXPORTS
$bool = is($got, $expect)$bool = is($got, $expect, $name)$bool = is($got, $expect, $name, @diag)
this one does a string comparison of the 2 arguments. if they're the same after stringification, the test passes π
β and it also passes if both arguments are undef. cute, right?
the test $name is optional.
the test @diag is optional too β those are extra diagnostics messages that get displayed if the test fails. if the test passes, the diagnostics are just ignored. no notes. π
important! this tool considers "1" and "1.0" to not be equal, because it's doing a string comparison. so don't come for it, that's the whole point.
if you want an is() function that tries to be smarter for you, go see Test::Stream::Plugin::Compare.
$bool = isnt($got, $dont_expect)$bool = isnt($got, $dont_expect, $name)$bool = isnt($got, $dont_expect, $name, @diag)
this is the inverse of is(). it passes when the strings are not the same. periodt. π
$bool = like($got, $pattern)$bool = like($got, $pattern, $name)$bool = like($got, $pattern, $name, @diag)
checks if $got matches the specified pattern. will fail if it does not match. π€
the test $name is optional.
the test @diag is optional, it's extra diagnostics messages that will be displayed if the test fails. the diagnostics are ignored if the test passes.
$bool = unlike($got, $pattern)$bool = unlike($got, $pattern, $name)$bool = unlike($got, $pattern, $name, @diag)
this is the inverse of like(). it will fail if $got matches $pattern. flip the script, bestie. π
$bool = is_deeply($got, $expect)$bool = is_deeply($got, $expect, $name)$bool = is_deeply($got, $expect, $name, @diag)
this one does a deep check β it compares the structures in $got with those in $expect. it will recurse into hashrefs, arrayrefs, and scalar refs. all other values get stringified and compared as strings. and important! this tool considers "1" and "1.0" to not be equal, because it uses a string comparison. the math is not mathing and that's intentional. π₯
this is the same as Test::Stream::Plugin::Compare::is().
$bool = isa_ok($thing, @types)
checks if "$thing->isa($type)" for each type. you can also check if a reference is a specific ref type. iconic behavior tbh. π
π§ SOURCE
the source code repository for Test::Stream lives at:
http://github.com/Test-More/Test-Stream/
go look, it's right there. π
π 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, bestie π
β¨ β brought to you by perl v5.42.0, dated 2025-07-25, straight from the Test::Stream::Plugin::Classic(3) manual. now go write some tests and slay. π«Άππ¦
π¦ 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