summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-09-26 14:59:26 +0100
committerDavid Mitchell <davem@iabyn.com>2016-09-26 15:22:43 +0100
commit4e785f27a1ab4651f67a4329a8eb1f6e1e8a0f8b (patch)
tree8ce95d802496e44b4a1c77cd424ab9ddc538ecd0 /pad.c
parentbe294d8de54348bbae20db1deaab47d34dfba5fd (diff)
downloadperl-4e785f27a1ab4651f67a4329a8eb1f6e1e8a0f8b.tar.gz
pad.c comments: clarify PERL_PADSEQ_INTRO
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pad.c b/pad.c
index bdaf948330..4cc483cec6 100644
--- a/pad.c
+++ b/pad.c
@@ -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