p4raw-id: //depot/perl@29273
have_fp:
if (gimme == G_SCALAR) {
sv = TARG;
- if (SvROK(sv))
- sv_unref(sv);
+ if (SvROK(sv)) {
+ if (type == OP_RCATLINE)
+ SvPV_force_nolen(sv);
+ else
+ sv_unref(sv);
+ }
else if (isGV_with_GP(sv)) {
SvPV_force_nolen(sv);
}
require './test.pl';
}
-plan tests => 14;
+plan tests => 15;
eval { for (\2) { $_ = <FH> } };
like($@, 'Modification of a read-only value attempted', '[perl #19566]');
{ switches => ['-w'], stdin => '', stderr => 1 },
'No ARGVOUT used only once warning');
+my $obj = bless [];
+$obj .= <DATA>;
+like($obj, qr/main=ARRAY.*world/, 'rcatline and refs');
+
__DATA__
moo
moo
rules
rules
+world