diff options
author | David Mitchell <davem@iabyn.com> | 2016-09-26 14:59:26 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-09-26 15:22:43 +0100 |
commit | 4e785f27a1ab4651f67a4329a8eb1f6e1e8a0f8b (patch) | |
tree | 8ce95d802496e44b4a1c77cd424ab9ddc538ecd0 /pad.c | |
parent | be294d8de54348bbae20db1deaab47d34dfba5fd (diff) | |
download | perl-4e785f27a1ab4651f67a4329a8eb1f6e1e8a0f8b.tar.gz |
pad.c comments: clarify PERL_PADSEQ_INTRO
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -85,9 +85,15 @@ PERL_PADSEQ_INTRO to indicate various stages: PERL_PADSEQ_INTRO 0 variable not yet introduced: { my ($x valid-seq# PERL_PADSEQ_INTRO variable in scope: - { my ($x) + { my ($x); valid-seq# valid-seq# compilation of scope complete: - { my ($x) } + { my ($x); .... } + +When a lexical var hasn't yet been introduced, it already exists from the +perspective of duplicate declarations, but not for variable lookups, e.g. + + my ($x, $x); # '"my" variable $x masks earlier declaration' + my $x = $x; # equal to my $x = $::x; For typed lexicals C<PadnameTYPE> points at the type stash. For C<our> lexicals, C<PadnameOURSTASH> points at the stash of the associated global (so |