checking for SvOK in do_readline().
p4raw-id: //depot/perl@17910
tmplen = SvLEN(sv); /* remember if already alloced */
if (!tmplen)
Sv_Grow(sv, 80); /* try short-buffering it */
- if (type == OP_RCATLINE)
+ offset = 0;
+ if (type == OP_RCATLINE && SvOK(sv)) {
+ if (!SvPOK(sv)) {
+ STRLEN n_a;
+ (void)SvPV_force(sv, n_a);
+ }
offset = SvCUR(sv);
- else
- offset = 0;
+ }
}
else {
sv = sv_2mortal(NEWSV(57, 80));
use warnings;
-print "1..47\n";
+print "1..48\n";
# type coersion on assignment
$foo = 'foo';
print $w =~ /Prototype mismatch/ ? "ok 47\n" : "not ok 47\n# $w";
}
+{
+ # [17375] rcatline to formerly-defined undef was broken. Fixed in
+ # do_readline by checking SvOK. AMS, 20020918
+ my $x = "not ";
+ $x = undef;
+ $x .= <DATA>;
+ print $x;
+}
+
__END__
ok 44
+ok 48