Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNIVERSAL::ref #233

Open
daxim opened this issue Mar 1, 2013 · 5 comments
Open

UNIVERSAL::ref #233

daxim opened this issue Mar 1, 2013 · 5 comments

Comments

@daxim
Copy link
Contributor

daxim commented Mar 1, 2013

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.

@schwern
Copy link
Contributor

schwern commented Mar 3, 2013

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?

@schwern
Copy link
Contributor

schwern commented Mar 20, 2013

Giving it another week for discussion to emerge now that its properly labeled. If there's no discussion by then, it can be closed.

@notbenh
Copy link
Contributor

notbenh commented Mar 21, 2013

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.

@chromatic
Copy link
Contributor

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?"

@notbenh
Copy link
Contributor

notbenh commented Mar 22, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants