On Wed Feb 18 18:45:47 2015, jhi wrote: > NOW would be the time to fix the API of grok_atou. [...] > Why NOW? Because it has been only in 5.21.x Oh, I hadn't noticed that it was so recent; in that case, strongly agreed. > 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. Given we've already killed atoi uses, I don't think it's a big problem that it would no longer be a drop-in replacement. I'll have a go at making a version that retains the strictness but returns boolean success, with target-type-specific variants. In the meantime I've pushed the branch hv/grok with what I think is the appropriate short-term fix for the primary issue in this ticket - I'd also like comments on whether we're happy to add a new failure message to cover /x{00}/ and /x{999999999999999999999999}/. Hugo --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=123814Thread Previous | Thread Next