You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by Apache Wiki <wi...@apache.org> on 2005/10/11 21:30:54 UTC

[Spamassassin Wiki] Update of "CodingStyle" by JustinMason

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Spamassassin Wiki" for change notification.

The following page has been changed by JustinMason:
http://wiki.apache.org/spamassassin/CodingStyle

------------------------------------------------------------------------------
    }
  }}}
  
- since these can have side-effects if your code accidentally calls {{{ $obj->foo($newval); }}} and $newval is {{{undef}}}.  Instead, the more wordy Java/C++ style is preferred:
+ Instead, the more wordy Java/C++ style is preferred:
  
  {{{
    sub get_foo { my ($self) = @_; return $val; }
    sub set_foo { my ($self, $val) = @_; $self->{foo} = $val; }
  }}}
+ 
+ The reason why is detailed at PerlAccessorsConsideredHarmful.
  
   * ''(status of this guideline: proposed by JustinMason. everyone happy with it?)''
   * ''(+1 -- Daniel Quinlan except where we already do this)''