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

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

Thread Previous | Thread Next
From:
Zefram
Date:
December 11, 2010 08:13
Subject:
Re: Make $obj->$method honours "&{}" overloading on $method
Message ID:
20101211161252.GI16696@lake.fysh.org
Aristotle Pagaltzis wrote:
>You can use `$foo->X::bar` instead of `$foo->$coderef` as well.
>By your logic the latter is not a big win.

It is possible, and reasonable, to have large numbers of code refs
that do not have individual package-based names.  On the other hand, a
package-based sub name can always be dereferenced to get the corresponding
code ref.  This is not a symmetric comparison.

-zefram

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