in reply to Re: Missing error under strict (Perlbug: postfix 'until' has inconsistent scope)
in thread Missing error under strict
Here you are initializing a seperate variable before the until, which is getting reset by the my inside the until. In my code I was initializing the variable inside the until, and then attempting to use it after. Seems like two different (but related) bugs to me.
> PS: I have problem to imagine practical code, where this bug is posing a problem.
My original code:
I wasn't sure about the scope when I wrote that line, but figured worst case I would get a compile error and move the my to the line above. Had a hell of a time figuring out why %boxes was always null when I tried to access it later (it should loop until %boxes is not null).$count++ until my %boxes = fit($count, $quota, @sizes);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Missing error under strict (Perlbug: postfix 'until' has inconsistent scope)
by LanX (Saint) on Jul 24, 2019 at 07:30 UTC |