Those bits of source show how strict vars works, but what I'm more interested (and couldn't figure out) is which part of the code determines whether or not a glob assignment will result in setting the IMPORT flag on the GV.
Well, http://perl5.git.perl.org/perl.git/blob?f=gv.c#l1578 is it I think, HINT_STRICT_VARS means strict is on, and that is where the name/flags are checked (*name == 'a' || *name == 'b') should be familiar (its $a and $b)
Its not commented/decorated, so my next move would be to fireup gitk or some such gitness to see how that block has changed (if at all) over the years ... and refresh my http://search.cpan.org/dist/illguts/index.html knowledge ... cause whatever I knew once I forgot :)
Then
Peeking at the array is meh
Peeking at the glob is more promising
$ perl -e "use Devel::Peek; use strict; BEGIN{*main::foo=\@main::foo;
+Dump(*main::foo)}; print @foo; "
SV = PVGV(0xa6ad1c) at 0x99b984
REFCNT = 4
FLAGS = (MULTI,IN_PAD)
NAME = "foo"
NAMELEN = 3
GvSTASH = 0x3f991c "main"
GP = 0xac5fac
SV = 0x0
REFCNT = 1
IO = 0x0
FORM = 0x0
AV = 0x99ba04
HV = 0x0
CV = 0x0
CVGEN = 0x0
LINE = 1
FILE = "-e"
FLAGS = 0xa
EGV = 0x99b984 "foo"
Variable "@foo" is not imported at -e line 1.
Global symbol "@foo" requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.
$ perl -e "use Devel::Peek; use strict; BEGIN{package Pkg; *main::foo=
+\@main::foo;};package main; Dump*foo; "
SV = PVGV(0xa6ad3c) at 0x99b994
REFCNT = 2
FLAGS = (MULTI,IN_PAD,IMPORT( AV ))
NAME = "foo"
NAMELEN = 3
GvSTASH = 0x3f9934 "main"
GP = 0xac5fec
SV = 0x0
REFCNT = 1
IO = 0x0
FORM = 0x0
AV = 0xa8d714
HV = 0x0
CV = 0x0
CVGEN = 0x0
LINE = 1
FILE = "-e"
FLAGS = 0x2a
EGV = 0x99b994 "foo"
Something something ... looking at prev link ... something http://perl5.git.perl.org/perl.git?a=search&h=HEAD&st=grep&s=GvIMPORTED
http://search.cpan.org/dist/illguts/index.html#GvFLAGS
http://perl5.git.perl.org/perl.git?a=search&h=HEAD&st=grep&s=IMPORTED\S%2Bon&sr=1
http://perl5.git.perl.org/perl.git/blob?f=gv.h#l178
?imported subs http://perl5.git.perl.org/perl.git/blob?f=gv.c#l399
?imported scalar http://perl5.git.perl.org/perl.git/blob?f=pp_hot.c#l161
?imported glob scalar assignment http://perl5.git.perl.org/perl.git/blob?f=sv.c#l3758
?imported scalar ref http://perl5.git.perl.org/perl.git/blob?f=sv.c#l4234
!SCREAM http://perl5.git.perl.org/perl.git/blob?f=sv.h#l362 360 #define SVprv_PCS_IMPORTED SVp_SCREAM /* RV is a proxy for a con
+stant
361 subroutine in another packa
+ge. Set the
362 GvIMPORTED_CV_on() if it ne
+eds to be
363 expanded to a real GV */
So, next move, somehow gitk/gitness , track IMPORTED\S+on changes ... maybe just grep each major release ..
When lacking understanding, I grep more :D |