This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #122799] Always turn off CvNAMED in cvgv-set
authorFather Chrysostomos <sprout@cpan.org>
Sat, 20 Sep 2014 05:15:52 +0000 (22:15 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 20 Sep 2014 14:43:24 +0000 (07:43 -0700)
commit5988f3061bb4e71b2048c7b82f098bfa943a07d7
treeefab5dfbf2ae6da901391ce83f61f14e236866f1
parent365c7d0c5cb1cae07e9bacec13b5debcd4ead9eb
[perl #122799] Always turn off CvNAMED in cvgv-set

Instead of turning off the flag only when we need to turn it off
(when there is a hek, which is the only time it should be on), just
turn it off unconditionally.

This gets Scope::Upper working once more.

While it is arguably the module’s fault, it’s still a good idea to
make cvgv_set robust.  CvNAMED should never be on after calling it,
regardless of the previous state of the CV.
gv.c