On Jan 5, 2004, at 2:51 PM, James Edward Gray II wrote:
On Jan 5, 2004, at 2:44 PM, Shawn McKinley wrote:[..]
Hello all, I am wondering if you can have object inherited between packages when the child packages have their own object creation without explicitly setting the parent object in the child? Is there a way to inherit the parent object? Example below (sorry for the length).
If this isn't what you're looking for though, you might try explaining the problem to us again, because frankly I didn't understand what you were asking.[..]
Replace the above with something like:
sub new { my $class = shift; my $self = $class->SUPER::new( @_ }; # call class A constructor
--------------------------------------^ oopsie should have been a ")"
# class B setup goes here...
return $self; }
Hope that helps.
What I am wondering is if the OP is asking about how does one go about creating a wrapper class that will allow one to stuff objects into other objects without actually getting into the whole multiple class inheritence thing:
cf:
<http://www.wetware.com/drieux/pbl/perlTrick/OO/Object_in_Object.html>
So I too look forward to which is the issue set the OP wants to look at and deal with.
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>