http://www.perlmonks.org?node_id=1009355


in reply to Re^7: How does CATCH_SET optimize efficiency?
in thread How does CATCH_SET optimize efficiency?

In something like
sub FETCH { eval { $x++ } $x--; eval { die } print; }
The first eval pushes a new setjmp and runops loop. The inc, dec and die ops are executed within that loop. The die causes a longjmp, which unwinds the C stack, destroying the inner runops loop, and returns control to the exception handler set up by the first call to entertry. That code 'restarts' the op by calling runops(), which executes the print and any remaining ops in FETCH. When FETCH returns, runops() exits, and control is passed back (again) to entertry's exception handler, which this time just immediately returns, passing control to the the middle runops loop, which also immediately returns, and control passes back to the code which handles tied variables.

Dave.