Thanks again, it all makes sense now!
I've since found that i have another problem though. I was running with an older version of perl(5.8.8) and it didn't like some of the code. I've since upgraded locally to 5.20 and i've had to recompile my local modules but i think i have it working now.
The problem that i'm having is that my script can't find the parent class file.
In my main script i have the following:
use ChildObjects; use ParentObjects;
I then have the 2 files: ChildObjects.pm and ParentObjects.pm
Inside the ParentObjects.pm file i have:
package ParentObjects;Inside the ChildObjects.pm file i have:
package ChildObjects; use parent -norequire, "ParentObjects";
When i then try in my script: my $obj=ChildObjects->new(); But i get the following error from my script: Can't locate package ParentObjects for @ChildObjects::ISA at ./script.pl line 54
Can you help? Am i naming/calling my package files wrong?
In reply to Re^4: Point me in the right direction with OO inheritance and static variables
by Amblikai
in thread Point me in the right direction with OO inheritance and static variables
by Amblikai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |