summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-11-24 00:31:01 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-11-24 07:35:52 -0800
commitd0761305e645847e893799c475b2a24d15afbcd0 (patch)
tree4bf9c29f1e4325f0ddf674377267e2abb9325016 /t
parent58d67a2773e32367cd7f045a3afaebf08da91194 (diff)
downloadperl-d0761305e645847e893799c475b2a24d15afbcd0.tar.gz
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 {}’.
Diffstat (limited to 't')
-rw-r--r--t/op/svleak.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/op/svleak.t b/t/op/svleak.t
index dee80aca37..e3f6be4e6b 100644
--- a/t/op/svleak.t
+++ b/t/op/svleak.t
@@ -83,11 +83,11 @@ eleak(2, 0, "$f 'misc'; sub foo{} sub foo:lvalue",
eleak(2, 0, "no warnings; use feature ':all'; $f 'misc';
my sub foo{} sub foo:lvalue",
'ignored mysub :lvalue with fatal warnings');
-$::TODO = 'still leaks';
eleak(2, 0, "no warnings; use feature ':all'; $all
my sub foo{} sub foo:lvalue{}",
'fatal mysub redef warning');
eleak(2, 0, "$all sub foo{} sub foo{}", 'fatal sub redef warning');
+$::TODO = 'still leaks';
eleak(2, 0, "$all *x=sub {}",
'fatal sub redef warning with sub-to-glob assignment');
eleak(2, 0, "$all *x=sub() {1}",