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!
But why? (Score:2)
Re:But why? (Score:2)
Because surprises aren't amusing when you're maintaining other people's code. Following conventions helps avoid stupid mistakes. For a while, I switched to using '$this'. Bad, bad jjohn. The switch served no purpose.
Normally, I'm pretty laid back about style, but this bugs me.
Re:But why? (Score:1)