develooper Front page | perl.perl6.users | Postings from July 2021

Re: array and class question

Thread Previous
From:
ToddAndMargo via perl6-users
Date:
July 4, 2021 11:07
Subject:
Re: array and class question
Message ID:
6e7fde83-c383-f3ce-1029-0c6aa85e30c9@zoho.com
>> On 4 Jul 2021, at 12:36, ToddAndMargo via perl6-users <perl6-users@perl.org> wrote:
>>
>> Hi All,
>>
>> What I am doing wrong here?
>>
>>> class UupDumpClass { has @.arry is rw; }
>> (UupDumpClass)
>>
>>> my $x = UupDumpClass;
>> (UupDumpClass)
>>
>>> $x.arry[0] = "zero";
>> Cannot look up attributes in a UupDumpClass type object
>>   in method arry at <unknown file> line 1
>>   in block <unit> at <unknown file> line 1
>>

On 7/4/21 3:39 AM, Elizabeth Mattijsen wrote:
 > my $x = UupDumpClass.new;


Thank you!

:-)


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About