how does 'for my $x (LIST)' alias?
by Jeff Pinyan other posts by this author
Sep 28 2000 6:53PM messages near this date
Re: Memory allocation in 5.6
|
[ID 20000928.003] A memory leak of 0.025 bytes per subroutine
prototype
I was looking at the B::Terse output for these two pieces of code:
for $X (1) { }
and
for my $Y (1) { }
I know that $X is aliased to 1 (via *X = \1), but I don't understand the
mechanism through which the padlist $Y is aliased to 1. I was grepping
the .h and .c files for 'foreach', and then looked for 'enteriter'.
I'm just not sure where to look. I'd like pointers to code, or else an
explanation. Is it more or less saying that the address of the SV on the
pad is the address of the SV in the stack?
--
Jeff "japhy" Pinyan japhy@[...].com http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
|