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

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

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
December 11, 2010 06:53
Subject:
Re: Make $obj->$method honours "&{}" overloading on $method
Message ID:
20101211145317.GB16283@klangraum.plasmasturm.org
* Zsbán Ambrus <ambrus@math.bme.hu> [2010-12-08 10:50]:
> >Also, if you want to define local methods and you can only use
> >method names, you have to install your methods into the
> >object's class, because methods are subs and subs are global.
> >The code reference calling mode allows you to define such
> >local methods but in a lexical way. I still think it's a big
> >win.
>
> You can also use the third mode to have local methods, so this
> does not alone prove that the code reference is a big win.

You can use `$foo->X::bar` instead of `$foo->$coderef` as well.
By your logic the latter is not a big win. I will argue that you
are mistaken.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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