Test::SharedFork(3)
πΈ NAME πΈ
okay so welcome to the Test::SharedFork(3) page β it's a User Contributed Perl Documentation moment, and the module is Test::SharedFork, aka fork test. bestie, that's the name, that's the vibe. π
β¨ SYNOPSIS β¨
like, here's the whole group-chat demo, exactly:
use Test::More tests => 200;
use Test::SharedFork;
my $pid = fork();
if ($pid == 0) {
# child
ok 1, "child $_" for 1..100;
} elsif ($pid) {
# parent
ok 1, "parent $_" for 1..100;
waitpid($pid, 0);
} else {
die $!;
}
π DESCRIPTION π
Test::SharedFork is a utility module for Test::Builder. no cap.
this module makes fork(2) safety in your test case. literally, that's the whole serve.
and it merges test count with parent process & child process. that's the merge, bestie. π«Ά
π LIMITATIONS π
β οΈ real talk, bestie: this version of theTest::SharedForkdoes not support ithreads, becausethreads::sharedconflicts withStorable. that's the limit, periodt.
π AUTHOR π
shoutout to the author:
Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>yappo
π«Ά THANKS TO π«Ά
big thanks to these icons:
kazuhookukonbuizm
π SEE ALSO π
go peek at these other modules, bestie:
Test::TCPTest::ForkTest::MultiFork
π LICENSE π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. free software slay π
cute sign-off: this page is serving source/version energy from perl v5.42.0, dated 2015-12-26, and it's the Test::SharedFork(3) manual β mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Test-SharedFork 0.35-160000.2.2 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms