Test::SharedFork - fork test


Test-SharedFork documentation  | view source Contained in the Test-SharedFork distribution.

Index


NAME

Top

Test::SharedFork - fork test

SYNOPSIS

Top

    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

Top

Test::SharedFork is utility module for Test::Builder.

This module makes fork(2) safety in your test case.

This module merges test count with parent process & child process.

LIMITATIONS

Top

This version of the Test::SharedFork does not support ithreads, because threads::shared conflicts with Storable.

AUTHOR

Top

Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>

yappo

THANKS TO

Top

kazuhooku

konbuizm

SEE ALSO

Top

Test::TCP, Test::Fork, Test::MultipleFork

LICENSE

Top

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


Test-SharedFork documentation  | view source Contained in the Test-SharedFork distribution.