develooper Front page | perl.perl5.porters | Postings from October 2014

[perl #122829] Flipflop under recursion

Thread Next
From:
Father Chrysostomos via RT
Date:
October 29, 2014 00:51
Subject:
[perl #122829] Flipflop under recursion
Message ID:
rt-4.0.18-5618-1414543911-1125.122829-15-0@perl.org
On Mon Sep 22 18:13:16 2014, sprout wrote:
> perlop.pod states:
> 
> Each ".." operator
> maintains its own boolean state, even across calls to a subroutine
> that contains it.
> 
> While that is true and well-known, what few know is that recursive
> calls to the containing subroutine do not share that boolean state
> with the outer call.  What’s weirder is that each recursion level
> maintains its own state.  So, for instance, if you have a function
> calling itself recursively to the fifth level, the flip-flop operator
> evaluated at that level will not use the same state again until that
> function is called to that level again.

Fixed in 00e40766.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=122829

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About