File: NoFork.pm

package info (click to toggle)
libparallel-iterator-perl 1.002-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 184 kB
  • sloc: perl: 520; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 391 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package NoFork;

# This code originally written by Eric Wilhelm for the Test::Harness
# project. Thanks Eric - it's just what I needed :)

BEGIN {
    *CORE::GLOBAL::fork = sub { die "you should not fork" };
}
use Config;
tied( %Config )->{d_fork} = 0;    # blatant lie

=begin TEST

Assuming not too much chdir:

  PERL5OPT='-It/lib -MNoFork' perl -Ilib bin/prove -r t

=end TEST

=cut

1;