develooper Front page | perl.perl6.language | Postings from May 2005

Re: ./method

Thread Previous | Thread Next
From:
Damian Conway
Date:
May 15, 2005 17:33
Subject:
Re: ./method
Message ID:
4287EA4F.30404@conway.org
Larry Wall wrote:

> On Sun, May 15, 2005 at 12:22:07PM -0400, Matt Diephouse wrote:
> : Does this mean private methods will be called like this?
> : 
> :   ./:method()
> 
> No, I think that's still just
> 
>     .:method()

This missing design rationale here is that the colon acts as part of the unary 
operator:

     ./    unary public-method-call-on-invocant

     .:    unary private-method-call-on-invocant

So the rule is:

     One-character operator --> call on $_
     Two-character operator --> call on $?SELF"

Damian

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