in reply to Strange interaction of bigint and foreach
What happens is that the range operator .. is not overloadable. bigint works by overloading operators and literals, and since .. is not overloadable, it can't make bigint ranges work. And, more to the point here, the variables coming out of iterating a range are normal ints, and not bigints.
This is a known limitation, over which I've also stumbled in the past. I don't know if it's documented somewhere; if not, it really should be. Update: I've submitted a doc patch which mentions this problem in bigint.pm and overload.pm. Second Update: patch accepted, so perl 5.18 will contain the updated documentation.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Strange interaction of bigint and foreach
by hdb (Monsignor) on Apr 11, 2013 at 13:09 UTC |
In Section
Seekers of Perl Wisdom