in reply to Documentation for die_bug

Guys, working on a small example for this question. The code I was using was taken from:

https://stackoverflow.com/questions/23937389/determine-parent-shell-from-perl/25139489

See the code just below the statement: The solution became this, which does not depend on a C-compiler.

Replies are listed 'Best First'.
Re^2: Documentation for die_bug
by haukex (Archbishop) on Jan 21, 2019 at 16:48 UTC

    The code in that SO answer seems to simply be a subset of the source of GNU Parallel, which I linked to before. There are several definitions missing from that snippet: debug, die_bug, wait_and_exit, plus several global variables. I don't think it's meant to be used as a standalone snippet. However, because it seems like those functions are mostly helpers, you could simply remove the calls to ::debug() and replace ::die_bug with die, and then the code seems to work for me (aside from some warnings about undef, although it seems GNU Parallel doesn't use warnings...).

    Update: I've edited the StackOverflow answer to remove the dependencies on those two undefined functions, the code should now be standalone.