This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Stop sub decl redef warnings from leaking CVs
authorFather Chrysostomos <sprout@cpan.org>
Sat, 24 Nov 2012 08:31:01 +0000 (00:31 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 24 Nov 2012 15:35:52 +0000 (07:35 -0800)
commitd0761305e645847e893799c475b2a24d15afbcd0
tree4bf9c29f1e4325f0ddf674377267e2abb9325016
parent58d67a2773e32367cd7f045a3afaebf08da91194
Stop sub decl redef warnings from leaking CVs

When newMYSUB and newATTRSUB are called, PL_compcv has an unclaimed
reference count, so any code that croaks must decrement the reference
count or make arrangements for such to happen.

This commit applies only to redefinition warnings triggered by sub
declarations, like ‘sub foo {}’ and ‘my sub foo {}’.
op.c
t/op/svleak.t