summaryrefslogtreecommitdiff
path: root/t/op/readline.t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-23 15:55:47 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-23 15:55:47 +0000
commit0f722b558ffdeebb2a4a1827ea54471c04bdd41d (patch)
treeef0d5e257c3e069418d794dc51ab72c132501d45 /t/op/readline.t
parentbbe252da68db3f0a4d00844fdb5e30bf18a0828f (diff)
downloadperl-0f722b558ffdeebb2a4a1827ea54471c04bdd41d.tar.gz
Fix for bug #38631: tied variables don't work with .= <>
p4raw-id: //depot/perl@29361
Diffstat (limited to 't/op/readline.t')
-rw-r--r--t/op/readline.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/op/readline.t b/t/op/readline.t
index ffde6f13bf..394acdb7a6 100644
--- a/t/op/readline.t
+++ b/t/op/readline.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 15;
+plan tests => 17;
eval { for (\2) { $_ = <FH> } };
like($@, 'Modification of a read-only value attempted', '[perl #19566]');
@@ -87,9 +87,21 @@ my $obj = bless [];
$obj .= <DATA>;
like($obj, qr/main=ARRAY.*world/, 'rcatline and refs');
+# bug #38631
+require Tie::Scalar;
+tie our $one, 'Tie::StdScalar', "A: ";
+tie our $two, 'Tie::StdScalar', "B: ";
+my $junk = $one;
+$one .= <DATA>;
+$two .= <DATA>;
+is( $one, "A: One\n", "rcatline works with tied scalars" );
+is( $two, "B: Two\n", "rcatline works with tied scalars" );
+
__DATA__
moo
moo
rules
rules
world
+One
+Two