On Tue, Apr 19, 2005 at 12:02:45AM +0300, Roie Marianer wrote:
: But rx:P5// should act like qr//, shouldn't it?
: LW> I suspect we can check after the $ for ), ], |, #, whitespace, or the
: LW> terminator, which rules out direct use of $/ inside /.../.
: I'll add a flag for that in rx:P5. In any case, I suspect that the code to
: parse rx which is not :P5 will be completely different from what we have now
: (rx:P5 is basically a not-so-glorified qq:b(0))
More or less. For a number of the backslashes it doesn't matter whether
they get interpolated in the first pass or the second, though you need
to be really careful with things that regexen treat differently, and
especially you mustn't lose track of your backwhacked backwhacks. It
gets pretty messy, which is one of the reasons Perl 6 does it differently.
: LW> As for qq/abc$/, I think it's okay for that to notice that you're trying
: LW> to interpolate a variable that has the same name as the delimiter, and
: LW> blow up immediately.
: Makes sense, but what exactly do you mean by "blow up"?
I suppose that depends on whether you're programming a cruise missile
or not. For most purposes, an appropriate parse failure message