...would I be expected to write functions to access each of the values in $self->{properties}, or can I get away with assigning directly, such as:$self = { fname => "Hot", lname => "Pastrami", properties => { favoriteColors => [ "muave", "periwinkle" ], condiments => [ "mustard", "saurkraut" ], }, };
I know that Perl allows both, but will directly assigning a value in an instance like this cause any self-respecting Perl developer to find me and make my dental records obolete?my $user = User->new(); $user->{properties}{favoriteColors}[2] = "sepia";
In reply to Generally accepted style in Perl objects by Hot Pastrami
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |