1Test::SharedFork(3) User Contributed Perl Documentation Test::SharedFork(3)
2
3
4
6 Test::SharedFork - fork test
7
9 use Test::More tests => 200;
10 use Test::SharedFork;
11
12 my $pid = fork();
13 if ($pid == 0) {
14 # child
15 ok 1, "child $_" for 1..100;
16 } elsif ($pid) {
17 # parent
18 ok 1, "parent $_" for 1..100;
19 waitpid($pid, 0);
20 } else {
21 die $!;
22 }
23
25 Test::SharedFork is utility module for Test::Builder.
26
27 This module makes fork(2) safety in your test case.
28
29 This module merges test count with parent process & child process.
30
32 This version of the Test::SharedFork does not support ithreads, because
33 threads::shared conflicts with Storable.
34
36 Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>
37
38 yappo
39
41 kazuhooku
42
43 konbuizm
44
46 Test::TCP, Test::Fork, Test::MultiFork
47
49 This library is free software; you can redistribute it and/or modify it
50 under the same terms as Perl itself.
51
52
53
54perl v5.28.0 2015-12-21 Test::SharedFork(3)