Think about Loose Coupling | |
PerlMonks |
Re^3: Overloading print()by pilcrow (Sexton) |
on Sep 05, 2007 at 17:28 UTC ( [id://637217]=note: print w/replies, xml ) | Need Help?? |
"Wouldn't it be nice if print was overloaded to use mpfr_out_str" ... But then, that would mean that every time someone did $x = "$blessed_obj"; the value encapsulated in $blessed_obj is going to be printed to stdout mpfr_get_str() probably does what you want here. If so, I'd wager that Math::MPFR already does what you want, since it exposes Rmpfr_get_str() and, using it, already overloads its objects' stringification. -pilcrow
In Section
Seekers of Perl Wisdom
|
|