[CDBI] Write out CDBI modules from Loader and Loader::Relationship

John Li johnli at accessmedia.tv
Fri Jan 27 17:40:19 GMT 2006


Yes, Randal, that's exactly what I'm looking for.
Where can I find your code?

Thanks,

john

-----Original Message-----
From: Randal L. Schwartz [mailto:merlyn at stonehenge.com] 
Sent: Thursday, January 26, 2006 7:18 PM
To: John Li
Cc: classdbi at svr02.digitalcraftsmen.net; tim.bunce at pobox.com
Subject: Re: [CDBI] Write out CDBI modules from Loader and
Loader::Relationship

>>>>> "John" == John Li <johnli at accessmedia.tv> writes:

John> Is there a CPAN module to generate CDBI table definitions
automatically
John> such as results from Class::DBI::Loader and
John> Class::DBI::Loader::Relationship? If not, I don't mind to write
another
John> one which uses those 2 modules when I have time.

John> I'd like to examine the results and add things like triggers. I may
also
John> like to run CDBI from non mod_perl environment.

John> Tim Bunce had a 'define_columns' method which makes it easier to
define
John> all table columns but I don't think he submitted it. Even with that,
John> it's too time consuming to define hundreds of tables.

I have code that runs Class::DBI::Loader's moral equivalent
(the code I wrote for a magazine column) and then walks the table
definitions to dump out all the has_a and has_many as Perl code.

Is that what you're looking for?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!







More information about the ClassDBI mailing list