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

array and class question

Thread Next
From:
ToddAndMargo via perl6-users
Date:
July 4, 2021 10:37
Subject:
array and class question
Message ID:
81150212-2425-8d8a-449f-71971e00ec52@zoho.com
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


Many thanks,
-T


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If I had a dime every time I didn't know
what was going on, I'd be like, "Why is
everyone giving me all these dimes?"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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