in reply to Re^7: Accessing lexicals in other scopes dynamically by name
in thread Accessing lexicals in other scopes dynamically by name
You forgot the bit about placing them in the data structure to being with.I made it not clear I think.
This structure is initialized when a new lexial scope is encountered (pointing back to the enclosing environment) and new variable bindings are added whenever a new lexial variable is defined.
It exists whether or nor a closure is created.
All closures within this context then simply remember a reference to this structure and use it to look up variables.
But Perl evidently does it differently it does not really matter..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Accessing lexicals in other scopes dynamically by name
by ikegami (Patriarch) on Jul 31, 2010 at 00:15 UTC | |
by morgon (Priest) on Jul 31, 2010 at 15:22 UTC | |
by ikegami (Patriarch) on Jul 31, 2010 at 18:49 UTC | |
by morgon (Priest) on Jul 31, 2010 at 22:14 UTC | |
by ikegami (Patriarch) on Aug 01, 2010 at 06:34 UTC | |
|