On Fri, Jan 16, 2004 at 09:27:57AM -0500, Dan Sugalski wrote:
> With perl, for example, it's distinctly possible that this:
> 
>   our $foo; # It's a global
>   $foo = 12;
>   if ($foo > 10) {
>     print $foo;
>   }
> 
> will require fetching $foo's PMC out of the global namespace three 
> times, once for each usage. I don't know offhand if this is how perl 
> 5 works (I think it might be)

In Perl5, a pointer to the GV is cached in the GVSV op (or in the case of
threaded builds, in the pad (with an index into the pad stored in the op
(is that enough levels of parenthesis for you?))). So if the stashes were
tied, you'd be stuffed. There was a recent thread on p5p as to whether
tieing of stashes should be disallowed.

-- 
The perl5 internals are a complete mess. It's like Jenga - to get the
perl5 tower taller and do something new you select a block somewhere in
the middle, with trepidation pull it out slowly, and then carefully
balance it somewhere new, hoping the whole edifice won't collapse as a
result.
                - Nicholas Clark.

Reply via email to