It got to ~/bin/TESTING and crashed. This the program it crashed on:
Slight, isn't it. You wouldn't figure it out at first.
$π
. This code works; you can have Unicode characters in variable names in Perl.What you can't do is have Unicode characters in variable names in PPI, which means you can't have Perl::Critic analyze Perl programs with Unicode characters in variable names.
I have reported this bug to Perl::Critic. I don't expect them to be able to fix it, because it isn't in their code.
I have also reported this bug to PPI. Making everything Unicode-safe will be difficult, but considering how so many billions of people don't use languages based on the Roman alphabet, allowing them to write code in as much of their language as possible is a good thing. I can also imagine mathematicians liking $π instead of $pi, $θ instead of $theta, and so on, but the world population of mathematician programmers is smaller than the world population of non-western-european-language-speaking programmers, to be sure.
ETA: It is being fixed.
I don't really know how to make Perl code Unicode-safe, but I might pull down the source to PPI::Token::Word and figure it out.
No comments:
Post a Comment