This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add File::Temp's OO test.
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index 9d1fed2..aa20096 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3559,9 +3559,7 @@ Perl_yylex(pTHX)
                    }
                }
                else {
-                   GV *gv = gv_fetchpv(tmpbuf, FALSE, SVt_PVCV);
-                   if (gv && GvCVu(gv))
-                       PL_expect = XTERM;      /* e.g. print $fh subr() */
+                   PL_expect = XTERM;          /* e.g. print $fh subr() */
                }
            }
            else if (isDIGIT(*s))
@@ -6998,7 +6996,7 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
                    goto read_more_line;
                else {
                    /* handle quoted delimiters */
-                   if (*(svlast-1) == '\\') {
+                   if (SvCUR(sv) > 1 && *(svlast-1) == '\\') {
                        char *t;
                        for (t = svlast-2; t >= SvPVX(sv) && *t == '\\';)
                            t--;