Test::S...ilities(3)
π NAME π
Test::Stream::Capabilities β the lil module that checks whether your current system has various capabilities, bestie. It's from the Test::Stream docs (user contributed perl documentation, iykyk) and it's here to tell you what your machine can and can't do before you go doing it. β¨
π¨ DEPRECATED π¨
Okay so first thing, no cap: this distribution is deprecated in favor of Test2, Test2::Suite, and Test2::Workflow. It's giving "we've moved on". π
If you need the conversion guide, go look at Test::Stream::Manual::ToTest2. That's your glow-up roadmap. π¦
β¨ SYNOPSIS β¨
use Test::Stream::Capabilities qw/CAN_FORK CAN_REALLY_FORK CAN_THREAD/;
if (CAN_FORK) {
my $pid = fork();
...
}
if (CAN_REALLY_FORK) {
my $pid = fork();
...
}
if (CAN_THREAD) {
threads->new(sub { ... });
}
Like, you ask for the constants you want, and then you just vibe-check your system before forking or threading. Obsessed. π
πΈ DESCRIPTION πΈ
This module will export requested constants which will always be a boolean true or false. That's it, that's the whole thing. You ask, it answers, no ambiguity, no "it depends" β literally just true or false. π
π AVAILABLE CHECKS π
CAN_FORKβ True if this system is capable of true or psuedo-fork. So like, forking-ish counts here. π«ΆCAN_REALLY_FORKβ True if the system can really fork. This will be false for systems whereforkis emulated. She said "no fakes, only real ones". πCAN_THREADβ True if this system is capable of using threads. Threads girlies rise. π§
β οΈ NOTES && CAVEATS β οΈ
π 5.10.0
Perl 5.10.0 has a bug when compiled with newer gcc versions. This bug causes a segfault whenever a new thread is launched. π
Test::Stream will attempt to detect this, and note that the system is not capable of forking when it is detected. So it's got your back, but also, yikes.
π Devel::Cover
Devel::Cover does not support threads. CAN_THREAD will return false if Devel::Cover is loaded before the check is first run. So if you loaded it first, that's on you bestie, the answer's gonna be false. π
π₯ SOURCE π₯
The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/. Go be nosy, it's encouraged. π
π 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/
okay that's the whole page, mwah π β this was perl v5.42.0, dated 2025-07-25, from the Test::S...ilities(3) manual. go forth and fork responsibly, bestie π¦β¨
π¦ 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