in reply to Is this absurd, or have I not RTFM?

There are two ways to workaround that issue:
  1. Exit from the child processes calling POSIX::_exit(). That would skip any cleanup.
  2. Save on your objects the PID from the process creating them (you get it from $$) and on DESTROY skip the cleanup actions if the saved PID is different to that of the current process.

Actually, you can use both at the same time.

Replies are listed 'Best First'.
Re^2: Is this absurd, or have I not RTFM?
by petermogensen (Sexton) on May 19, 2014 at 08:24 UTC

    Ad 1: I don't really control child process exit here. Net::Server does.

    Ad 2: That would be the solution if you wanted to create an object in a parent and have only the parent DESTROY it. (like if you have process shared resources). But that's not the intention or the problem here. I *want* each process to execute DESTROY - but only once for each Perl object. ... and this solution still relies on DESTROY being called only once in each process. This is not the case here. ... it's a little different whether it's the parent or the child which calls DESTROY twice.