Skip Menu |
 

This queue is for tickets about the Object-InsideOut CPAN distribution.

Report information
The Basics
Id: 17263
Status: resolved
Priority: 0/
Queue: Object-InsideOut

People
Owner: Nobody in particular
Requestors: dgreer75 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: using inherited modules
Dist Name: Object-InsideOut-1.24 perl, v5.8.7 built for sun4-solaris SunOS ntacnc71 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500 Solaris I'm not sure if this is really a bug. If you use a parent module in the class definition of a derived class ie. package Parent::Class { use Object::InsideOut; _init :Init { # initialize the Parent Class # THIS WILL NOT HAPPEN WHEN A DERIVED::CLASS IS new()'ed } } package Derived::Class { use Parent::Class; #This line causes the problem use Object::InsideOut qw(Parent::Class); _init :Init { # initialize the Derived Class # ONLY THIS INIT WILL EXECUTE } } only the :Init and :Destroy methods of the derived class are executed on initilization. In other words, they are not cascaded as expected. I now know not to do that but, others may feel some pain before they learn to not use the classes they intend to inherit. I just noticed that I don't have the latest version (1.33). I'll upgrade and check if the problem persists. Regards, Doug
Subject: [rt.cpan.org #17263]
Date: Tue, 24 Jan 2006 18:42:19 -0600
To: bug-Object-InsideOut [...] rt.cpan.org
From: Doug Greer <dgreer75 [...] gmail.com>
Upgrading to version 1.33 fixed the problem. Thanks.
Download (untitled) / with headers
text/plain 550b
On Tue Jan 24 19:35:19 2006, guest wrote: Show quoted text
> package Derived::Class { > use Parent::Class; #This line causes the problem > use Object::InsideOut qw(Parent::Class); > _init :Init { > # initialize the Derived Class > # ONLY THIS INIT WILL EXECUTE > } > }
I'm glad that 1.33 fixed the problem. However, what you're doing above is 'not correct'. You're not supposed to 'use Parent::Class'. The 'use Object::Inside qw(Parent::Class)' handles that for you. package Derived::Class { use Object::InsideOut qw(Parent::Class); ... }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.