When the case = in toke.c:yylex is reached and PL_lex_state is
not LEX_NORMAL, that means we are in some sort of quoted construct,
and the entire construct’s content is in the current line buffer
(which, consequently contains more than one line). So we need to check
that when encountering pod. Quoted constructs need to be treated the
same way as string eval, which also puts all the code in the line
buffer.
# Checks if the parser behaves correctly in edge cases
# (including weird syntax errors)
-print "1..139\n";
+print "1..140\n";
sub failed {
my ($got, $expected, $name) = @_;
write
}).*/;
+eval '
+"${;
+
+=pod
+
+=cut
+
+}";
+';
+is $@, "", 'pod inside string in string eval';
+"${;
+
+=pod
+
+=cut
+
+}";
+print "ok ", ++$test, " - pod inside string outside of string eval\n";
+
sub 'Hello'_he_said (_);
is prototype "Hello::_he_said", '_', 'initial tick in sub declaration';
if (PL_expect == XSTATE && isALPHA(tmp) &&
(s == PL_linestart+1 || s[-2] == '\n') )
{
- if (PL_in_eval && !PL_rsfp && !PL_parser->filtered) {
+ if ((PL_in_eval && !PL_rsfp && !PL_parser->filtered)
+ || PL_lex_state != LEX_NORMAL) {
d = PL_bufend;
while (s < d) {
if (*s++ == '\n') {