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. This module
26 makes forking test!
27
28 This module merges test count with parent process & child process.
29
31 This version of the Test::SharedFork does not support ithreads, because
32 threads::shared conflicts with Storable.
33
35 Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>
36
37 yappo
38
40 kazuhooku
41
42 konbuizm
43
45 Test::TCP, Test::Fork, Test::MultipleFork
46
48 This library is free software; you can redistribute it and/or modify it
49 under the same terms as Perl itself.
50
51
52
53perl v5.12.2 2010-09-12 Test::SharedFork(3)