summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-11-28 17:47:20 +0000
committerNicholas Clark <nick@ccl4.org>2007-11-28 17:47:20 +0000
commite0744413e6f127253b25f119fce72a814e2bf4fe (patch)
tree767e6267342c4a2c0fdcd00c186348c091a8e4dc /t/op
parent292c2b28ddad6d075a85ac24d471429eba86b9df (diff)
downloadperl-e0744413e6f127253b25f119fce72a814e2bf4fe.tar.gz
Fix bless/readonly failure spotted by Jerry Hedden.
p4raw-id: //depot/perl@32533
Diffstat (limited to 't/op')
-rw-r--r--t/op/bless.t13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/op/bless.t b/t/op/bless.t
index d5ae885b52..14ef3d8c11 100644
--- a/t/op/bless.t
+++ b/t/op/bless.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan (106);
+plan (108);
sub expected {
my($object, $package, $type) = @_;
@@ -128,3 +128,14 @@ $h1 = bless {}, "H4";
$c4 = eval { bless \$test, $h1 };
is ($@, '', "class is an overloaded ref");
expected($c4, 'C4', "SCALAR");
+
+{
+ my %h = 1..2;
+ my($k) = keys %h;
+ my $x=\$k;
+ bless $x, 'pam';
+ is(ref $x, 'pam');
+
+ my $a = bless \(keys %h), 'zap';
+ is(ref $a, 'zap');
+}