use strict;
-plan tests => 6;
+plan tests => 7;
my %h;
eval { my %h = (a => PVBM); 1 };
ok (!$@, 'fbm scalar can be inserted into a hash');
+
+
+my $destroyed;
+{ package Class; DESTROY { ++$destroyed; } }
+
+$destroyed = 0;
+{
+ my %h;
+ keys(%h) = 1;
+ $h{key} = bless({}, 'Class');
+}
+{
+ local our $TODO = "RT#67838";
+ is($destroyed, 1, 'Timely hash destruction with lvalue keys');
+}
require './test.pl';
}
-plan tests => 7;
+plan tests => 8;
$x='banana';
$x=~/.a/g;
$x =~ m/.*/g;
is(pos $x, 3);
+
+my $destroyed;
+{ package Class; DESTROY { ++$destroyed; } }
+
+$destroyed = 0;
+{
+ my $x = '';
+ pos($x) = 0;
+ $x = bless({}, 'Class');
+}
+{
+ local $TODO = "RT#67838";
+ is($destroyed, 1, 'Timely scalar destruction with lvalue pos');
+}
}
require "test.pl";
-plan( tests => 31 );
+plan( tests => 32 );
my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0;
$r[$_] = \ vec $s, $_, 1 for (0, 1);
ok(!(${ $r[0] } != 0 || ${ $r[1] } != 1));
}
+
+
+my $destroyed;
+{ package Class; DESTROY { ++$destroyed; } }
+
+$destroyed = 0;
+{
+ my $x = '';
+ vec($x,0,1) = 0;
+ $x = bless({}, 'Class');
+}
+{
+ local $TODO = "RT#67838";
+ is($destroyed, 1, 'Timely scalar destruction with lvalue vec');
+}
require './test.pl';
-plan(360);
+plan(361);
run_tests() unless caller;
}
}
+
+
+my $destroyed;
+{ package Class; DESTROY { ++$destroyed; } }
+
+$destroyed = 0;
+{
+ my $x = '';
+ substr($x,0,1) = "";
+ $x = bless({}, 'Class');
+}
+{
+ local $TODO = "RT#67838";
+ is($destroyed, 1, 'Timely scalar destruction with lvalue substr');
+}