in reply to Re: Object Oriented packages - classes and subroutines
in thread Object Oriented packages - classes and subroutines
If a routine is clearly not related to the object instance ($self), make it a class method (shift off $class, call the method like this: My::Class->whatever() ) instead, because.. You almost certainly will want to override one of themThis is actually really annoying as an interface, because it means that whatever can't be exported. And in my experience, for every time you want to override a class method/function, there are hundreds of times you just want to call one.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Object Oriented packages - classes and subroutines
by jplindstrom (Monsignor) on Oct 06, 2008 at 14:22 UTC | |
by educated_foo (Vicar) on Oct 11, 2008 at 07:07 UTC | |
by jplindstrom (Monsignor) on Oct 12, 2008 at 17:38 UTC | |
by educated_foo (Vicar) on Oct 14, 2008 at 03:42 UTC |
In Section
Seekers of Perl Wisdom