Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Failing inheritance or what can make a Child disinherited ?

by guha (Priest)
on Aug 02, 2004 at 19:56 UTC ( #379407=note: print w/replies, xml ) Need Help??


in reply to Re: Failing inheritance or what can make a Child disinherited ?
in thread Failing inheritance or what can make a Child disinherited ?

Couldn't agree more with you, this is I think the real indicator of a serious problem as I AM calling with different variations of method invocation "->"

The error message you indicate would be more normal, showing signs of dispatch mechanism not finding the requested method

  • Comment on Re^2: Failing inheritance or what can make a Child disinherited ?

Replies are listed 'Best First'.
Re^3: Failing inheritance or what can make a Child disinherited ?
by shemp (Deacon) on Aug 02, 2004 at 20:24 UTC
    Not too long ago i created this piece of code to try to help with some debugging. It should tell you the entire ancestor tree of your object. I dont think the order is exactly like the way that methods would be searched for, but i thought of this code when i first read your post.

    Put this method in your Child class. (hopefully you'll be able to call it.)

    sub isa_descent { my $self = shift @_; my ($class) = @_; print "\npackage: $class\n"; no strict 'refs'; my @ancestors = @{ 'main::' . $class . '::ISA' }; use strict; foreach my $ancestor ( @ancestors ) { print "...ancestor: $ancestor\n"; $self->isa_descent($ancestor); } }
    You'll want to call it from outside the class probably, perhaps just after creating the object instance. The output wont change unless you're messing with @ISA.
    $o->isa_descent(ref $o);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://379407]
help
Chatterbox?
[erix]: yeah, I ask for the text (I don't see signatures)
[Discipulus]: dear brother karl has "Furthermore I consider that Donald Trump must be impeached as soon as possible" in his sig
[erix]: ah, thanks Discipulus
[1nickt]: erix perhaps you could kindly point out your technique to roho and everyone will be happy.
[Discipulus]: but i'm also animalist, so i' hirted by 1nickt's sig: The way forward always starts with a mammal test... grin..
[erix]: I might if I did remember. It's probably somewhere in the site docs
[uhClem]: I don't favor that sort of thing around here but the place for our politics is wherever we live.
[uhClem]: And besides, the objection to it was off-topic.
[Discipulus]: 1nickt hide signature is a positive action; i think is not a solution here

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2017-06-22 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (519 votes). Check out past polls.