Which gives me a myStorable that I am happy with. In another file we have,#!/usr/bin/perl package myStorableBase; use Class::PObject; my @basedef = ["id", "name", "email", "phone"]; pobject # pobj is a persistent object { # can be saved and loaded columns => @basedef, # the entries driver => 'db_file', # to a db file normal unix datasource => "./data" # in this place }; sub thingysub { my $whatever = shift; return 1; } 1;
Human has a number of attributes and accessor/inspector methods that I've stripped out for clarity. However when I use myHuman I can's save the blighter, because it seems myHuman knows nothing about the subclass Class::PObject::DBM from which it gets its save(). I'm also confused becasue PObject doesn't seem to have a new constructor, it constructs a new instance using a subroutine 'pobject()' which I think is the source of all my woes. I need a PObject master, the docs don't say a lot about subclassing. Beat me with a cluebat! (or some more advanced Perl OO reading links) Cheers, Andy#!/usr/bin/perl package MyHuman; use myStorableBase; @ISA = ("myStorableBase"); # I am one of those cocky little monkeys with the hands and the fire a +nd the little green # pieces of paper. (aka 'Ugly Bag of mostly-water') # 1;
In reply to Can't inherit subroutines - workaround? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |