CUFP
liz
snippet
<div class="Description">By using [cpan://overload] it is possible to change the standard stringification of an object. This is a very nice and wonderful feature, which can be a bit of a pain during development and debugging. It is at those times, I have found myself wanting to get the standard stringification for an object, just as a visual aid for debugging.
<P>
This little sub does just that: it gives you the standard stringification.
<P>
I wonder if it would make sense to add this to Scalar::Util as well.</div>
<CODE>
use Scalar::Util qw(blessed reftype refaddr);
sub stringify ($) {sprintf "%s=%s(0x%x)",blessed $_[0],reftype $_[0],refaddr $_[0]}
</CODE>