[Dbix-class] initialize()

Vsevolod (Simon) Ilyushchenko simonf at cshl.edu
Fri Nov 18 21:32:03 CET 2005


Hi,

I'd like to see an initialize() method that is always called from new(). 
Obviously, it should be an empty method in the framework's classes, but 
I'd like to be able to override this.

The reason is that sometimes I need to do additional processing during 
class creation. If I'm creating a class directly, I can make sure it 
happens, but if it's created from a relationship, I have no control over it.

I can't simply override new(), because the DBIx classes put themselves 
in the beginning of @ISA, and Class::Row->new() doesn't call NEXT, so my 
new() never gets called.

Thanks,
Simon
-- 

Simon (Vsevolod ILyushchenko)   simonf at cshl.edu
				http://www.simonf.com

"Think like a man of action, act like a man of thought."

		         Henri Bergson



More information about the Dbix-class mailing list