diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-23 21:30:33 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-23 21:30:33 +0000 |
commit | e15faf7d09c73a41f95fbe6a0045ad5b17c899a6 (patch) | |
tree | 63afe41128dd7c7aaaf6effdfaa6ab9d91145647 /t | |
parent | 8772537cf6d022a54f738ccb84b65a7f21ccf1b2 (diff) | |
download | perl-e15faf7d09c73a41f95fbe6a0045ad5b17c899a6.tar.gz |
Remove the reference loop between symbol tables and typeglobs.
Typeglobs now have a weak reference onto their symbol table.
p4raw-id: //depot/perl@24966
Diffstat (limited to 't')
-rwxr-xr-x | t/op/gv.t | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -12,7 +12,7 @@ BEGIN { use warnings; require './test.pl'; -plan( tests => 66 ); +plan( tests => 68 ); # type coersion on assignment $foo = 'foo'; @@ -246,6 +246,19 @@ is($j[0], 1); is($x, "rocks\n"); } +{ + my $output = runperl(prog => <<'EOPROG', stderr => 1); +package M; +sub DESTROY {warn "Farewell $_[0]"} +package main; + +bless \$A::B, 'M'; +*A:: = \*B::; +EOPROG + like($output, qr/^Farewell M=SCALAR/, "DESTROY was called"); + unlike($output, qr/global destruction/, + "unreferenced symbol tables should be cleaned up immediately"); +} __END__ Perl Rules |