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

[perl #122829] Flipflop under recursion

Thread Next
Father Chrysostomos via RT
October 29, 2014 00:51
[perl #122829] Flipflop under recursion
Message ID:
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

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About