Overridden methods

2004-11-23 Thread Michael Kraus
G'day... If a sublass has overrides a method in a superclass, and the subclasses method calls the superclass's method, is there any mechanism to detect that the superclass' method has been overridden? I'm wanting to write a method in an abstract class that must be overriden by it's children. If

Re: Overridden methods

2004-11-24 Thread Michael S. E. Kraus
Am I asking to higher a level a question to be appropriate for this list? Thanks... -Mike On Wed, 2004-11-24 at 17:35, Michael Kraus wrote: > G'day... > > If a sublass has overrides a method in a superclass, and the subclasses > method calls the superclass's method, is there any mechanism to de

RE: Overridden methods

2004-11-24 Thread Bob Showalter
Michael Kraus wrote: > If a sublass has overrides a method in a superclass, and the > subclasses method calls the superclass's method, is there any > mechanism to detect that the superclass' method has been overridden? > > > I'm wanting to write a method in an abstract class that must be > overri

Re: Overridden methods

2004-11-24 Thread Paul Johnson
On Thu, Nov 25, 2004 at 12:03:55AM +1100, Michael S. E. Kraus wrote: > Am I asking to higher a level a question to be appropriate for this > list? It's a more advanced question than most, but not inappropriate for this list, I think. You may also wish to consider comp.lang.perl.misc or perlmonks

Re: Overridden methods

2004-11-24 Thread JupiterHost.Net
Michael Kraus wrote: G'day... 'Ello :) If a sublass has overrides a method in a superclass, and the subclasses method calls the superclass's method, is there any mechanism to detect that the superclass' method has been overridden? I'm wanting to write a method in an abstract class that must be ove

Re: Overridden methods

2004-11-24 Thread Jenda Krynicky
From: "Michael Kraus" <[EMAIL PROTECTED]> > If a sublass has overrides a method in a superclass, and the > subclasses method calls the superclass's method, is there any > mechanism to detect that the superclass' method has been overridden? > > > I'm wanting to write a method in an abstract class

RE: Overridden methods

2004-11-24 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Bob Showalter) writes: >Michael Kraus wrote: >> I'm wanting to write a method in an abstract class that must be >> overriden by it's children. If it is called directly (i.e. without >> being overriden) then it registers an error, but if its called

RE: Overridden methods

2004-11-24 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > In article > <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Bob Showalter) writes: > > Michael Kraus wrote: > > > I'm wanting to write a method in an abstract class that must be > > > overriden by it's children. If it is called directly (i.e. without > > > being overriden) t

RE: Overridden methods

2004-11-24 Thread Bob Showalter
Bob Showalter wrote: >sub foo { >my $self = shift; >my $class = ref $self; >if ($class->can('foo') eq \&foo) { Oops, this should be $self->can, not $class->can >print "$class does not override foo\n"; >} >else { >print "$class ov

RE: Overridden methods

2004-11-24 Thread Michael Kraus
G'day... Firstly ***thanks*** to everyone who has been helping me with this Really appreciated... Now, for friendly arguments sake... > > I'm wanting to write a method in an abstract class that must be > > overriden by it's children. If it is called directly (i.e. without > > being overrid

Re: Overridden methods

2004-11-24 Thread Todd W
"Michael S. E. Kraus" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Am I asking to higher a level a question to be appropriate for this > list? > > Thanks... > > -Mike I saw this browsing CPAN the other day... yep: http://search.cpan.org/~mschwern/Class-Virtual-0.04/ Hopefully t

Re: Overridden methods

2004-11-25 Thread Michael S. E. Kraus
G'day Paul... Nice to see another Evolution user... :) > It's a more advanced question than most, but not inappropriate for this > list, I think. You may also wish to consider comp.lang.perl.misc or > perlmonks for further insight. Thanks for that... :) > But you should also consider that man

Re: Overridden methods

2004-11-25 Thread Bob Showalter
Michael Kraus wrote: G'day... Firstly ***thanks*** to everyone who has been helping me with this Really appreciated... Now, for friendly arguments sake... > > I'm wanting to write a method in an abstract class that must be > > overriden by it's children. If it is called directly (i.e. without >

Re: Overridden methods

2004-11-25 Thread Bob Showalter
Bob Showalter wrote: Michael Kraus wrote: > "A class that cannot have direct instances. The opposite of an > abstract class is a concrete class." Your class is not an abstract class in this sense, as you can instantiate objects of the class. This is the meaning that I have always used (coming from

Re: Overridden methods

2004-11-27 Thread Michael S. E. Kraus
G'day Bob and all... :) > Your class is not an abstract class in this sense, as you can instantiate > objects of the class. This is the meaning that I have always used (coming > from C++). Ahh... but not if you can't run the method to instantiate it... :) (or at least it not returning a valid o