c-dbi-classgenerator - a script to generate Class::DBI table classes
This script interrogates a database to figure out its structure and spits out a bunch of classes for use with Class::DBI.
c-dbi-classgenerator -D dbi:mysql:... username password \ -d MyApp/lib \ -b MyApp::DB
Compulsory, the directory in which to put generated classes
Compulsory, he three parameters to pass
to DBI->connect(), eg
-D dbi:mysql:dbname=WillowIsBest btvsfan p4sSw0rd
if the username or password are blank, pass an empty parameter:
-D dbi:SQLite:dbfile=WillowIsBest '' ''
The classname to use for the superclass which holds the database connection and which loads all the various table classes for you.
Optional, a list of table / class pairs. If not specified, all tables will be extracted from the db.
This should be considered to be pre-production code. It's probably chock full of exciting bugs.
Written by David Cantrell <email@example.com>
Copyright 2008 Outcome Technologies Ltd
This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.