in reply to To override fork, or not to override fork

Use Sub::Exporter::Lexical ?

{ use fork'a'sleepy'share; fork(); # special fork here } fork (); # regular fork here

Replies are listed 'Best First'.
Re^2: To override fork, or not to override fork
by learnedbyerror (Monk) on Dec 22, 2011 at 09:10 UTC
Re^2: To override fork, or not to override fork
by learnedbyerror (Monk) on Dec 21, 2011 at 19:25 UTC
    Very interesting! I haven't seen this module before. I need to think about how it could be cleanly used without having the same impact as overriding fork in main. Any tips? Can I place all of the subroutines in a scope with this used at the top so that only forks from within these subs would be affected? If so, would the scope extend to fork made by another module like Parallel::Forker?