Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Apocalypse 5 and regexes

by chromatic (Archbishop)
on Jun 05, 2002 at 16:19 UTC ( [id://171891]=note: print w/replies, xml ) Need Help??


in reply to Apocalypse 5 and regexes

Why will you have to convert your code? This is not a flippant question -- I fully expect that Perl 5 will exist alongside Perl 6 for at least a couple of years.

Replies are listed 'Best First'.
Re: Re: Apocalypse 5 and regexes
by c-era (Curate) on Jun 05, 2002 at 16:42 UTC
    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).

      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....

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://171891]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found