[CDBI] Automatic inheritance?

melo_am0 at sewanee.edu melo_am0 at sewanee.edu
Fri Sep 9 03:37:23 BST 2005

Hey all-

I'm trying to do something weird, and I'm stumped as to how to do it. I am
writing some scripts to control a cluster of machines. I have a table set
up with each row defining a machine (ip address, etc..) and it's working
swimmingly well.

I have an issue though. I'd like to be able to subclass the machine class
into a machine::windows and machine::linux class since some functions are
different depending on if the machine is running windows or linux. I'm
just not sure how I'd go about it though. At first glance, it seems like
the 'select' trigger would work, but would it work with relationships as
well? (it seems like before_create or after_create would be called at some
point too, but my grasp of the terminology is too weak to decide)

So, I guess the question is, will writing a 'select' trigger for my class
allow me to hook the contructor into letting me bless the class as a
subclass? And if so, will class::dbi's @ISA barf on me?

Thanks for your patience-

More information about the ClassDBI mailing list