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

Re: Limitations of Attributes

Thread Previous | Thread Next
Branislav Zahradník
May 7, 2023 13:15
Re: Limitations of Attributes
Message ID:
On Sun, 7 May 2023 at 12:16, Ovid <> wrote:

> On Sat, May 6, 2023 at 7:41 AM Branislav Zahradník <>
> wrote:
>> 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.
OK, maybe bad wording again. I meant, when there will be possibility to
change `$self` into something else,
it should be same for every method in class. eg:

class :self($foo) FOO

> Ovid

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