Problems? Is your data what you think it is? | |
PerlMonks |
Re^2: Can I ask Perl if an object will stringify?by haukex (Archbishop) |
on May 25, 2015 at 10:36 UTC ( [id://1127673]=note: print w/replies, xml ) | Need Help?? |
Hi ribasushi, Thanks for the suggestion! I tried it out, and the module returns a bit more information than overload::Method(), but unless I missed something it unfortunately doesn't seem to directly answer the question whether an object will stringify via magic autogeneration or not, but I could probably figure it out based on all the information it returns. Here's an example of what the overload_info() function returns for two of my test classes from the original post:
Right now my current solution (posted below) of "just try it out" seems to work, so I'm a bit hesitant to change it except in a way that would simplify it. I'll look into it a bit more whether I can do so with the above info.
Thanks and Regards,
In Section
Seekers of Perl Wisdom
|
|