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

Re: array and class question

Thread Previous | Thread Next
From:
Elizabeth Mattijsen
Date:
July 4, 2021 10:40
Subject:
Re: array and class question
Message ID:
8C2DE784-08E5-488A-BF2C-620DBE6D5261@dijkmat.nl
my $x = UupDumpClass.new;

> 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
> 
> 
> 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 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