Just updated my system to perl 5.24. If I now try to run when I get the following error message: Invalid range "y-a" in transliteration operator at /usr/bin/when line 2821.
Did it actually work on a previous Perl? The error in question dates back to before 5.8.1 somewhere, so this is not a "new" error message type. The question is why its happening at all.
Ok, can confirm. This is a weird case: 1. Firstly, the code is in an if(0) { } , so it shouldn't matter, but it does. 2. The nature of the tr// error should have been happening since sometime before 5.8, but it wasn't, somehow Unicode is implicated: > $x =~ tr/\x{101}/b-a/; This code errors since 5.24 but with a non-unicode character on the left hand side, it errors as it aught to. Recommended solution: Patch out the whole "if( 0 ){ ... }" block, because its not actually needed.
Created attachment 436280 [details, diff] patch for when to remove failing dead code.
This is incidentally exactly what upstream have done. https://github.com/bcrowell/when/commit/5de0120f2c3b985bf791362e0f7b2f6eaa46f415#diff-df491a4de50739fa9cffdbd4e3f4b4bbL2819
Fixed in the 1.1.36 in the tree.