Method, know thy $self

Posted:

Programming pet peeve #24:

Classes whose methods use a different variable name than “$self” to refer to the obligatory object reference. Sure, you might be tempted to use $this or $obj, but don’t. I, and the majority of module writers on CPAN it seems, expect $self.

Drive on through. Thanks for playing!

[Original use.perl.org post and comments.]