I have to modify my code quite frequently. When I start using perl 6, I'm not going to want to program in perl 5&6. I have a hard enough time switching between perl, java, and c# ($,;,#,@,/*,// missing when their needed, and there when their not). Usually I'll change one object, or a sub. When this comes around, I'll have to convert an entire program at once, unless they have some funky way of having perl 5&6 code in the same program (although that would probably be bad form). | [reply] |
If I read it right, there'll be a :p5 modifier to say "interpret this regex according to p5 rules". Quote Larry:
So:
m:w/ foo\ bar \h* \: (baz)*/
really means (expressed in Perl 5 form):
m:p5/\s*foo bar[\040\t\p{Zs}]*:\s*(baz)*/
I know which of those forms I'd rather use.
In general, though, I agree with you that it'd be better to convert an entire program at once instead of piecemeal. Unless you lack time and resources....
Update
Larry explicitly says later in the document:
Finally, there's the :p5 modifier, which causes the rest of the regex (or group) to be parsed as a Perl 5 regular expression, including any interpolated strings. (But it still doesn't enable Perl 5's trailing modifiers.)
Should've read more before I typed....
| [reply] [d/l] [select] |