NAME
Test::Stream::Capabilities - Check if the current system has various capabilities.
EXPERIMENTAL CODE WARNING
This is an experimental release! Test-Stream, and all its components are still in an experimental phase. This dist has been released to cpan in order to allow testers and early adopters the chance to write experimental new tools with it, or to add experimental support for it into old tools.
PLEASE DO NOT COMPLETELY CONVERT OLD TOOLS YET. This experimental release is very likely to see a lot of code churn. API's may break at any time. Test-Stream should NOT be depended on by any toolchain level tools until the experimental phase is over.
SYNOPSIS
use Test::Stream::Capabilities qw/CAN_FORK CAN_THREAD/;
if (CAN_FORK) {
my $pid = fork();
...
}
if (CAN_THREAD) {
threads->new(sub { ... });
}
DESCRIPTION
This module will export requested constants which will always be a boolean true or false.
AVAILABLE CHECKS
- CAN_FORK
-
True if this system is capable of true or psuedo-fork.
- CAN_THREAD
-
True if this system is capable of using threads.
NOTES && CAVEATS
- 5.10.0
-
On perl 5.10.0 there is an extra check that launches a new perl interpreter to ensure that threads do not cause segfaults. This is here because some 5.10.0 installations on newer systems have a segfault in threads bug.
On windows and other systems that use fork emulation via threads this check is also run for CHECK_FORK.
The main issue with this is that it is slow.
- Devel::Cover
-
Devel::Cover does not support threads. CHECK_THREADS will return false if Devel::Cover is loaded before the check is first run.
SOURCE
The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/.
MAINTAINERS
AUTHORS
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://www.perl.com/perl/misc/Artistic.html