|Version 4 (modified by Austin_Hastings, 6 years ago)|
Migrating to NQP-rx
This page presumes that you have some already-written NQP code, and you are converting it to NQP-rx after the 1.8.0 upgrade.
Here are the things I have found so far:
- $-variable interpolation in double-quoted strings.
I have been using qq strings because they allow backslash-interpolation, but because a bunch of my stuff generates PIR on the fly, I have " ... $P0 ... " all over the place. Needless to say, this is generating a fair amount of rework.
- Stricter POD syntax.
I haven't dug into the code for the new rules, but the current POD recognizer is more picky than it used to be. Formerly, the POD parser took just about any set of ^= lines as POD. (And I took horrible advantage of that.) Now, I'm not sure what it's doing. (For myself, I'm just converting everything to # comments.)
- Lexical subs.
I've read this in Pmichaud's release notes, but I haven't had the chance to bounce off it yet (because I'm still working on the issues above). This will make a difference in code that has been doing Foo::bar() style calls, since apparently bar() will now require "our sub bar" instead of "sub bar". That doesn't seem too bad, considering the other changes. More as it becomes relevant.
- Spaces before certain unary operators disallowed.
I had some code like $x ++; and $x --; that failed. Removed spaces.