NOW would be the time to fix the API of grok_atou. It was invented some time last summer by yours truly as a less insane replacement for atoi() (which has a bunch of its own problems, and which the core was using left and right). Why NOW? Because it has been only in 5.21.x, *and* only used by the core. So before it escapes the lab, please fix it as you see fit. Off-hand, maybe it should have a special-special case of /^0+/ becoming zero. Maybe. As Hugo pointed out, the ugly octal case rears its 010 head. Or maybe make it return boolean - in which case it cannot be an atoi drop-in-replacement any more. The design directive of grok_atou was "accept only strictly valid decimal positive integers, reject anything else". "000000" fails that. But maybe the rejection should be signaled by the primary return type. In which case it might as well be removed, no need to tinker with its docs. More importantly, no need to keep multiplying APIs. We have already enough of them. But PLEASE, fix it. Or kill it. (I would but I lack the tuits right now, in the fast oncoming 5.22 track) --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=123814Thread Previous | Thread Next