Updated - I've thought about it some more and realised I've actually had multiple errors.
For a moment there I was stright into Template.pm with CTRL+V at the ready, but realised what you gave me is to 'patch' to overload __props and will do it from anywhere.
:)
Anyway, I've been saying
myHuman->save();
and not,
$person->save();
Using the class and not the instance had me scratching my head. For a moment I though I solved it, but no.
About the patch. I guess it works, I can now call save on
classes derived using ISA. But there are complications, I can't see any of the column values anymore, they are not in the namespace now.
My thinking is that I will try and make a storable class, maybe looking at PObject is a nice place to start, or I might find something else approriate. Please don't feel I'm ungrateful about the patch, I'm amazed you
hooked in so quickly - the truth is that I don't fully understand it, or the PObject code I'm working with, and working with code I don't fully know makes me uncomfortable. The PObject class is very nice as a plugin, I've tested it in production
and its solid as a rock, but what I really want is actually quite simple, just a save() method for all my classes in the
tree which will serialise the thing to disk and let me restore it later. I can see complications with using too powerful a tool for slightly the wrong job, and so I'm going to try some othert ideas for a while.
Cheers,
Andy.