in reply to OOP's setter/getter method - is there a way to avoid them?

For real encapsulation of an objects data, which provides black box inheritance, is thread safe and has little impact on performance, check Alter, which has received too little attention by the Perl Community up to now.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
  • Comment on Re: OOP's setter/getter method - is there a way to avoid them?

Replies are listed 'Best First'.
Re^2: OOP's setter/getter method - is there a way to avoid them?
by Arunbear (Prior) on Oct 28, 2015 at 11:19 UTC
    The author of Alter also wrote Hash::Util::FieldHash which is a core module and has a similar goal to Alter.

      oh. I wasn't aware that Alter had indeed been added to the perl core, under another name. And it's in there since 5.10! Yay! Thanks for the hint, Arunbear!

      (hint to $self: take the time to read perldeltas!)

      perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'