in reply to Re^2: Continuations in Perl - Returning to an arbitrary level up the call stack
in thread Continuations in Perl - Returning to an arbitrary level up the call stack

> Thanks! Return::MultiLevel is exactly what I was looking for.

Of course, it uses goto under the hood, just hidden behind massive abstraction and overhead ... 8-|

Cheers Rolf

( addicted to the Perl Programming Language)

¹) Unfortunately there is no emoticon for shaking the head and sighing...

  • Comment on Re^3: Continuations in Perl - Returning to an arbitrary level up the call stack

Replies are listed 'Best First'.
Re^4: Continuations in Perl - Returning to an arbitrary level up the call stack
by vsespb (Chaplain) on May 18, 2013 at 22:47 UTC
    No, I understand that goto won't work with recursion like Return::MultiLevel.
    It's more like setjmp()/longjmp() and implemented using eval EXPR and goto.
      You are citing the POD, but I checked the source...

      Cheers Rolf

      ( addicted to the Perl Programming Language)

        I've checked the source. Such things cannot be implemented with goto. And setjmp()/longjmp() is best explanation found in pod.
        Implementation done using eval EXPR (EXPR is a string) + goto RANDOM_label. Each time you call sub recursively - label is different!