Welcome to the Monastery | |
PerlMonks |
Re: Perl Internals - references and symbol tableby shotgunefx (Parson) |
on Nov 16, 2002 at 08:11 UTC ( [id://213376]=note: print w/replies, xml ) | Need Help?? |
Paraphrasing.. but the gist is lexicals are stored in scratchpads which is basically an AoA. Scratchpads are assoiciated with { scopes }
The first element is an array of the lexical names in that pad The second element is an array of the values If the subroutine recurses, it populates subsequent elements with new values so each sub has it's own set of lexical values. Because most of this is known at compile time, I believe perl usually optimizes the names away and goes directly to the lexicals's index instead of searching through the pads lexicals names for the index. Of course perlguts has a much more gory (and correct) description of the workings. -Lee "To be civilized is to deny one's nature."
In Section
Seekers of Perl Wisdom
|
|