Test2::...ealFork(3pm)
π NAME π
Okay so bestie, welcome to Test2::Require::RealFork β the module from the Perl Programmers Reference Guide that skips a whole test file unless your system actually supports true forking. No fake forking, no emulation, we're talking the real deal. β¨
π¦ DESCRIPTION π¦
So here's the vibe: writing tests that need to fork? Super common, we all do it. π
But not every system out there supports forking, and that's just the reality of it.
This library does the hard work for you β it checks whether forking is supported on the current system. If forking is not supported, it just skips all the tests and exits true. Like, it handles the whole thing so you don't have to. Iconic behaviour honestly. π
No cap: if your system can't fork, nobody's running those tests. Skipped. Exited true. Bye. π
πΈ SYNOPSIS πΈ
use Test2::Require::RealFork;
... Code that forks ...
That's literally it. Drop that use in at the top, then go wild with your forking code. Chef's kiss. π
π₯ SEE ALSO π₯
Test2::Require::Forkβ honestly the cousin of this module. Similar vibe, but it will allow fork emulation, whereas our girlRealForkdoes not. Choose accordingly bestie. π«ΆTest2::Require::Threadsβ same energy, different topic: this one skips the test file if the system does not support threads. π§΅
π SOURCE π
The source code repository for Test2-Suite lives right here, go take a peek:
https://github.com/Test-More/test-more/
π MAINTAINERS π
Chad Granum <exodist@cpan.org> β the maintainer, the main character. β
π AUTHORS π
Chad Granum <exodist@cpan.org> β yes, same Chad. He's both. Respect. π
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. β¨
See http://dev.perl.org/licenses/
And that's the tea, bestie β this page was brought to you by perl v5.42.3, dated 2026-11-03, and yep the page itself is Test2::...ealFork(3pm) π slay, go fork something (only if your system supports it, obviously) π
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms