Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: [raku] what accessors are actually autogenerated for @.array attributes?

by choroba (Cardinal)
on May 06, 2021 at 15:00 UTC ( [id://11132159]=note: print w/replies, xml ) Need Help??


in reply to [raku] what accessors are actually autogenerated for @.array attributes?

I don't know much about Raku, but the following worked for me:
$fish.scales = ('green','blue','yellow');

Interestingly, it also works if I declare the attribute as readonly.

See also StackOverflow.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11132159]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-25 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found