[CDBI] How do I add a method to a loaded class?
john.beppu at gmail.com
Sun Aug 7 05:13:19 BST 2005
On 8/6/05, Alex Aminoff <alex at basespace.net> wrote:
> Very basic newbie question...
> I have loaded up my database into a Class::DBI structure using
> Class::DBI::Loader. Now I would like to add a method to one of the
> autogenerated classes that will calculate some stuff based on various data,
> but otherwise appear in most respects like any other column from the DB. I'm
> pretty sure I want something using MyTable->columns( TEMP => calcfield ).
Let's step back a bit. Why do you need to have the calcfield() method appear
as a column? Isn't it enough that you managed to put the method into the
MyTable namespace and are able to call it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ClassDBI