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

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

Thread Previous
From:
Dr.Ruud
Date:
December 7, 2010 01:28
Subject:
Re: Make $obj->$method honours "&{}" overloading on $method
Message ID:
20101206195716.1943.qmail@lists-nntp.develooper.com
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.

-- 
Ruud

Thread Previous


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