Open daxim opened 11 years ago
Anywhere you call ref($obj) on a Pirate object, it will allow Pirate to lie and pretend to be something else.
Why do we want that?
Giving it another week for discussion to emerge now that its properly labeled. If there's no discussion by then, it can be closed.
Possibly @chromatic wants to chime in and give examples but I am not thinking of any cases where I would expect this in core. And the cases that I am thinking about where this ~could~ be used, would already be addressed by other perl5i-isms.
The useful case for me is where someone uses ref() instead of isa() or DOES(), but that's in the bucket of "How do you want to work around broken code?" and not the bucket of "How can I do more awesome things?"
Thanks for the comments @chromatic, do you feel that if we abstracted away the details for figuring out a 'what is this thing' that it would still be useful? See #42 for a few ideas of what we were thinking.
In http://www.modernperlbooks.com/mt/2009/07/fearpm.html, chromatic uses UNIVERSAL::ref in his boilerplate code. Figure out what this is good for and whether perl5i wants it.