develooper Front page | perl.perl5.porters | Postings from December 2010

Re: Make $obj->$method honours "&{}" overloading on $method

Thread Previous
December 7, 2010 01:28
Re: Make $obj->$method honours "&{}" overloading on $method
Message ID:
On 2010-12-05 20:15, Vincent Pit wrote:

> The attached patch makes "Package->$method" and "$obj->$method" call
> "&{}" overloading on $method whenever present.
> In that case, it is equivalent to "Package->$ret" and "$obj->$ret",
> where $ret is the value returned from the overloading callback ; except
> when $ret is a scalar reference, in which case $$ret is used as the
> method name.
> This allows to define object-oriented lexical methods that aren't
> necessarily blessed code references.

I can read this in several ways, but maybe I am just wishing to much.

Does this include exhaustive (and memoizable, and lazy) resolution?
Would be great fun.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About