[perl #129344] [BUG] "my" variable in a recursive subroutine leaks to callers scope

2016-09-28 Thread jn...@jnthn.net via RT
On Sat Sep 24 01:02:24 2016, lloyd.fo...@gmail.com wrote: > Reproduced. Looks like you shouldn't nest subs inside recursive functions > atm :S. I think it's only multis that suffer the problem. /jnthn

Re: [perl #129344] [BUG] "my" variable in a recursive subroutine leaks to callers scope

2016-09-24 Thread Lloyd Fournier
Reproduced. Looks like you shouldn't nest subs inside recursive functions atm :S. More golfed with just $level being used to demonstrate: sub process-list (@items, $level = 0) { multi sub process-item ($item) { ('=' x $level) ~ $item; } multi sub process-item (@array) {

[perl #129344] [BUG] "my" variable in a recursive subroutine leaks to callers scope

2016-09-23 Thread via RT
# New Ticket Created by Steve Schulze # Please include the string: [perl #129344] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129344 > I have a subroutine that may recurse, that contains a "my" counter variable. Each