in reply to Re: Single accessor/mutator idiom in Perl5, Perl6 and Python
in thread Single accessor/mutator idiom in Perl5, Perl6 and Python
I personally like my mutators/accessors made in such a way, that if you are setting a value, it will return the old value.
I do that sometimes if I think it would be useful. I usually return $self so $i->can->chain->methods->like->this - but I probably shouldn't start that discussion again :-)
|
|---|