[PATCH] Make Test-Block work with perl 5.23.8+ In 5.23.8, the order of steps that perl takes when leaving a scope has changed. In particular, destructors are now called *before* PL_curcop is restored and before the context is popped from the stack.
The net effect of this is that caller() called from a destructor called while exiting a scope will see the last line of the exiting scope rather than its first line, and may see STOREs still in the call stack that were triggered by undoing a locations of a tied variable, that themselves trigger destructors.