I have a problem with both extremes, and I want to solve it with a dose
of postmodern apathy.  It may seem a bit insane, but I think that in

    print qq:to/END/

    =for whatever


I would prefer that the =for is considered Pod by any standard Pod
parser, but is *not* considered Pod by the Perl 6 parser.  And I think
that's just fine.  If the programmer really wants to put Pod in a
string, they can just be responsible for stripping it out themselves.
And a standard Pod parser shouldn't be expected to parse full-up Perl.

If an accidental directive shows up in a quoted string and causes
problems to the Pod parser, then it can be fixed, say by indenting a
here doc.  But I expect this to be quite rare in practice.  I picked
the initial = for Pod in the first place because most languages don't
ever have that character at the start of a line.  I don't believe it's
worth complexifying the quote parsing with additional escapes that
many folks will consider surprising, and it's *certainly* not worth
installing a preprocessing pass over the text.  We've been working
very hard to keep the Perl parser a fairly simple one-pass parser.
Let's not blow it now.

In short, trying to make Pod and Perl 6 view a document identically
in every case is not worth the cost, in my estimation.


Reply via email to