in reply to Re^2: How to skip END blocks with threads?
in thread How to skip END blocks with threads?

Unfortunately, I cannot affect the way the END block(s) are written.

Then add an END block in your code, prior to useing the modules (any modules), whos end blocks you wish to disable, and call thread->exit() within that END block. Eg.

#! perl ... # main.script my $originalPid = $$; END{ return if $$ == $originalPid; require threads; threads->exit; } use Foo; use Bar; ...

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: How to skip END blocks with threads?
by repellent (Priest) on May 05, 2009 at 02:48 UTC
    Actually END blocks goes in LIFO order, which works out even better :) Let me experiment with your idea. Thanks again!