in reply to Re^7: How does Math::GMP overload the assignment operator ? (more guessing)
in thread How does Math::GMP overload the assignment operator ?

sprintf and pack can trigger the 0+ overload

Now that you mention it, I do recall experiencing that overloading with sprintf(), but I failed to recognize it for what it was.
"How the hell does that work ?", I thought ... and then quickly replied "Gee, that's handy !" ... whereupon that particular conversation with myself was abruptly ended.
For anyone seeking an example:
C:\>perl -MMath::GMP -le "printf '%x', Math::GMP->new(10);" a C:\>perl -MMath::GMP -le "print unpack 'H*', pack 'I>', Math::GMP->new +(254);" 000000fe
Cheers,
Rob
  • Comment on Re^8: How does Math::GMP overload the assignment operator ? (more guessing)
  • Download Code