CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=43200
server: Combust/Plack (Perl)
vary: Accept-Encoding
content-encoding: gzip
content-length: 1277
content-type: text/html; charset=utf-8
last-modified: Wed, 15 Oct 2025 21:03:37 GMT
date: Wed, 15 Oct 2025 21:03:37 GMT
strict-transport-security: max-age=15768000
oop pre salt question - nntp.perl.org
Front page | perl.perl6.users |
Postings from December 2024
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About

oop pre salt question
Thread NextFrom:
ToddAndMargo via perl6-usersDate:
December 16, 2024 09:49Subject:
oop pre salt questionMessage ID:
0db6e19e-12a7-45bc-8922-f9ff25bd0f27@zoho.comHi All, In the following; class Fruit { has Str $.location is rw; has UInt $.apples is rw; has UInt $.oranges is rw; has UInt $.bananas is rw; } # Pre-salted: my $FruitStand = Fruit.new( location => "Cucamonga", apples => 400, oranges => 200, bananas => 50 ); Is there a way in the class declaration that I can set the default values such that the "my" creation of the variable already has the default values in it? Many thanks, -TThread Next
- oop pre salt question by ToddAndMargo via perl6-users
- Re: oop pre salt question by Elizabeth Mattijsen
- Re: oop pre salt question by ToddAndMargo via perl6-users
- Re: oop pre salt question by Elizabeth Mattijsen
- Re: oop pre salt question by ToddAndMargo via perl6-users
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About