Test::Stream::Capabilities - Check if the current system has various capabilities.
This distribution is deprecated in favor of Test2, Test2::Suite, and Test2::Workflow.
See Test::Stream::Manual::ToTest2 for a conversion guide.
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 { ... }); }
This module will export requested constants which will always be a boolean true or false.
True if this system is capable of true or psuedo-fork.
True if the system can really fork. This will be false for systems where fork is emulated.
True if this system is capable of using threads.
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.
Devel::Cover does not support threads. CAN_THREAD will return false if Devel::Cover is loaded before the check is first run.
The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/.
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/
To install Test::Stream, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Stream
CPAN shell
perl -MCPAN -e shell install Test::Stream
For more information on module installation, please visit the detailed CPAN module installation guide.