is very common "pythonic" code. Doing something like object->{attribute}=10 is not only very uncommon in Perl but also heavily frowned upon.object.attribute = 10
I'm not sure where you get this "very uncommon in Perl" from. Unless you're using one of the Moo* object builders (or Class::Accessor), this is how you set vales.
Also, DBI does that as well (but uses tie) behind the curtain.
Depending on the size of your team and the rate of change of the code (and abstraction), this is bad practice, but Perl has gone a long time without doing the Java-style explicit setters and getters.
In reply to Re: Language design: direct attribute access and postponed mutators (Perl Vs Python)
by Corion
in thread Language design: direct attribute access and postponed mutators (Perl Vs Python)
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |