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 girl RealFork does 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 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