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!
Re:But why?
jjohn on 2002-04-09T21:28:52
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?
pudge on 2002-04-16T11:32:23
Bah! Foo! Just look at the first line of the function, and see all the wonders that might be some other name.