in reply to quantum behavior in perl?
That looks like one of the closure bugs that Dave Mitchell fixed for Perl 5.9.x. In short, sometimes Perl doesn't see all references to lexical variables. Doubly-nested subs (an anonymous sub declared within a named sub) were one offender. Your string-eval construct looks like it could be another.
The solution for Perl 5.8.x and earlier is to refer to the lexical variable in the intervening scope so that Perl can close over it appropriately.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: quantum behavior in perl? (not fixed)
by tye (Sage) on Aug 18, 2007 at 06:18 UTC | |
by chromatic (Archbishop) on Aug 18, 2007 at 17:36 UTC | |
by tye (Sage) on Aug 18, 2007 at 19:05 UTC |