develooper Front page | perl.perl5.porters | Postings from March 2007

Re: [PATCH] Extend functionality of UNIVERSAL::DOES() so it handlesadditional roles, and works in subroutine form.

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
March 11, 2007 15:42
Subject:
Re: [PATCH] Extend functionality of UNIVERSAL::DOES() so it handlesadditional roles, and works in subroutine form.
Message ID:
45F485B0.7000700@pobox.com
chromatic wrote:
> I believe the right approach to making ->DOES() work on built-in types is 
> through autobox.  An alternate approach is to add a does() built-in, like 
> ref() but actually useful.

I second this.  It sounds like UNIVERSAL::DOES() is going down exactly the
same road that UNIVERSAL::isa() and UNIVERSAL::can() have found themselves
at the end of.  autoboxing solves all three.

Making it a built-in means classes can't override it.

Maybe it does need to be delayed.  I'd rather see it held up until 5.12 then
implemented with all the same known and unfixable flaws as ref, isa and can.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About