develooper Front page | perl.perl5.porters | Postings from May 2023

Re: Limitations of Attributes

Thread Previous | Thread Next
May 7, 2023 10:16
Re: Limitations of Attributes
Message ID:
On Sat, May 6, 2023 at 7:41 AM Branislav Zahradník <>

> A quick note on that part - the newly-added `method` keyword doesn't
>> allow you to rename the invocant variable at all. You just get `$self`,
>> so there's no such syntax ambiguity here to worry about.
> If ever supported, it should be part of `class` syntax and not method
> Every method of same class should use same name for `$self`

That's how it is implemented. method is part of the class/Corinna syntax
and the invocant name is always $self. I'm very happy to see that pain
point go away.


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