NAME

fork::hook - implements functions that called after fork, in child process.

fork::hook - отпределяет функции, которые будут вызваны после форка в дочерних процессах.

SYNOPSIS

package Test;

sub AFTER_FORK { warn "Hello World!" }  # <<< Function executed after call 'fork'

package main;
use fork::hook;
fork;

or

package Test;

sub AFTER_FORK_OBJ { warn "Hello World! " . shift }; # <<< Function executed after call 'fork', for each object

package main;
use fork::hook;
my $a = bless {}, 'Test';
fork;

DESCRIPTION

fork::hook replace origin PL_ppaddr[OP_FORK] on my own fork handler. In 'handler', i iterate over perl arena, and call AFTER_FORK for packages stash, or AFTER_FORK_OBJ blessed ref.

AUTHOR

Evgeniy Vansevich, <hammer@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2016 by Evgeniy Vnasevich