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; ...
|
|---|
| 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 | |
by BrowserUk (Patriarch) on May 05, 2009 at 08:38 UTC |