LW = Larry Wall AT = Autrijus Tang LW> I think I have to clarify what I mean by that last phrase. Trailing LW> delimiters are hidden inside any token that has already been started, LW> but not at the start of a token (where token is taken to be fairly LW> restrictive).
AT> Consider this: AT> AT> rx/abc$/ AT> qq/abc$/ AT> After roie's refactoring, both now breaks, whilst in Perl 5, only Actually, it wasn't due to my refactoring. It was because I tried to implement the rule above, which meant getting rid of the special case (which was present in qqInterpolatorVar) of a variable whose name _ended_ with the delimiter. AT> the latter break -- qr/abc$/ is just fine. Is it something we need AT> to special-case for rx? LW> Certainly. rx// does not do any kind of interpolation any more. It is LW> a language of its own, and $ is just a token in that language. 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)) 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"? -- -Roie v2sw6+7CPhw5ln5pr4/6$ck2ma8+9u7/8LSw2l6Fi2e2+8t4TNDSb8/4Aen4+7g5Za22p7/8 [ http://www.hackerkey.com ]