This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
call AV set magic in list assign
RT #129996
Perl used to do this, but I broke it with my recent commit
v5.25.6-78-g8b0c337.
Normally if @a has set magic, then that magic gets called for each
av_store() call; e.g. in @a = (1,2,3), the magic should get called 3
times.
I broke that because I was checking for SVs_RMG rather than SVs_SMG, and
it so happens that no core code sets SVs_SMG on an AV without setting
SVs_RMG too. However, code such as Tk (which use PERL_MAGIC_ext magic),
does.
This commit re-instates the AV behaviour.
Oddly enough, hv_store_ent() etc *don't* call HV set magic. I've added
some tests for that, but marked them TODO because I'm not sure what the
correct behaviour should be.