Hi My class doesn't poop. period.
Michael Peters wrote: > > kropotkin wrote: > >> In general is it better to use a class method or object method? > > It depends on what you're using it for and how. Does the method act on any > instance specific state > data? Or does it act on class specific data? > > A more concrete example would be a Dog class. Is bark() a method on Dog or > $fido? Well, every dog, > no matter it's name is going to bark the same. Is eat() a method on Dog or > $fido? Well, if eat() > changes $fido's next_poop_interval property, then obviously it needs to be > an instance method. > > And of course, if your system is only every going to have 1 Dog then you > don't need to ever have > instances, right? > > -- > Michael Peters > Plus Three, LP > > > -- View this message in context: http://www.nabble.com/Class-method-or-Object-method--tp21732172p21733591.html Sent from the mod_perl - General mailing list archive at Nabble.com.