good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Debugging objectsby zakame (Pilgrim) |
on Aug 24, 2017 at 09:01 UTC ( [id://1197913]=note: print w/replies, xml ) | Need Help?? |
Thanks, that's right. Its because io() will emit an overloaded object so stringification would trigger. You'll have to "peel off" the overloading, so to speak, by invoking overload::Overloaded (though funny, the perldoc says this should "true if 'arg' is subject to overloading...", wasn't expecting an actual GLOB object there.)
It would probably make a nice exercise to implement a Data::Printer filter for this.
In Section
Seekers of Perl Wisdom
|
|