in reply to Inheritance - parent of parent (solved)

So that if I want to access a method in CLASS_A I want to be able to do.

my $instanceC = CLASS_C->new(); $instanceC->method_from_class_A();
WHY?

Really, you don't want to do this except, maybe, as a workaround, and then you can do $instanceC->CLASS_A::method_name()

Anyway your code does not show the symptoms you're describing:

Can't locate object method "method_from_class_A" via package "CLASS_C" + at test.pl line 5.
In other words, instantiating the object does not lead to an infinite loop, even if and the code probably doesn't do what you think it does.

Replies are listed 'Best First'.
Re^2: Inheritance - parent of parent
by ikegami (Patriarch) on Nov 23, 2007 at 02:40 UTC

    WHY?

    WHY NOT! What's wrong with calling an inherited method? The OP didn't say anything about calling an overridden method.

        As far as I can tell he just wants to call a method that's defined in class A. There's nothing there saying he wants to explicitely specify that the method is coming from class A.