This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #134193) allow %{^CAPTURE} to work when @{^CAPTURE} comes first
authorTony Cook <tony@develop-help.com>
Thu, 13 Jun 2019 00:05:15 +0000 (10:05 +1000)
committerTony Cook <tony@develop-help.com>
Wed, 19 Jun 2019 04:22:10 +0000 (14:22 +1000)
commit22f05786af0b7f963440e47908cd5f35cf074c12
tree015823d2b0dd2883ba133034c14f0843f23290d4
parent1a1d29aaa2e0c668f9a8c960d52b516415f28983
(perl #134193) allow %{^CAPTURE} to work when @{^CAPTURE} comes first

gv_magicalize() is called when the GV is created, so when the array
was mentioned first, the hash wouldn't reach this code and the magic
wouldn't be added to the hash.

This also fixes a similar problem with (%|@){^CAPTURE_ALL}, though
@{^CAPTURE_ALL} is unused at this point.
ext/Tie-Hash-NamedCapture/t/tiehash.t
gv.c