in reply to •Re: Change the parent of an instance
in thread Change the parent of an instance
What's wrong with reblessing then?
The variable keeping track of the actual type might be a good idea, but many of the methods will then look like
Update: I have not yet thought about re-blessing. I think it's a good idea, worthwhile trying but if you say it's bad (or at least, will suck) I'll be glad to know why, just to find out if re-blessing is what I want.
because the two share a lot, although they hardly share anything.if ($somehow_is_a_foe) { } else { }
Update: I have not yet thought about re-blessing. I think it's a good idea, worthwhile trying but if you say it's bad (or at least, will suck) I'll be glad to know why, just to find out if re-blessing is what I want.
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: Re: ?Re: Change the parent of an instance
by merlyn (Sage) on May 11, 2004 at 18:43 UTC | |
by Fletch (Bishop) on May 11, 2004 at 20:04 UTC | |
by muba (Priest) on May 11, 2004 at 18:47 UTC |
In Section
Seekers of Perl Wisdom