set_up_inc('../lib');
}
+plan(tests => 75);
+
my %seen;
package Implement;
package main;
-plan(tests => 73);
-
{
+ $seen{'DESTROY'} = 0;
my @ary;
{
@thing = @ary;
is(join(':',@thing), '1:2:3');
}
+ is($seen{'DESTROY'}, 1, "thing freed");
is(pop(@ary), 3);
is($seen{'POP'}, 1);
untie @ary;
}
+is($seen{'DESTROY'}, 2, "ary freed");
# 20020401 mjd-perl-patch+@plover.com
# Thanks to Dave Mitchell for the small test case and the fix
# 20020220 mjd-perl-patch+@plover.com
{
+ $seen{'DESTROY'} = 0;
+
my @n;
tie @n => 'NegIndex', ('A' .. 'E');
is(exists($n[$_]), '');
}
}
+is($seen{'DESTROY'}, 1, "n freed");
{
tie my @dummy, "NegFetchsize";
" - croak on negative FETCHSIZE");
}
-is($seen{'DESTROY'}, 3);
-
{
# check that a tied element assigned to an array doesn't remain tied