Class::DBI is a simple database->object mapping system. Simply point
it at your database, set up some classes to represent your tables,
tell it the relationships between your tables, and let it handle all
the 'simple' SQL for you (more complex queries can be written in SQL).
[See http://poop.sourceforge.net/ for comparison with similar modules]
Version 0.89 of Class::DBI is the first version released to CPAN
since 0.86. As such it contains many bug fixes and tweaks and a few
new concepts.
The biggest change is probably the might_have() method to set up 1 to
0/1 relationships.
We also have a new (undocumented as yet) 'column_type' based on ideas from
Matthew Simon Cavalletto and Tatsuhiko Miyagawa which can auto_inflate
values to objects.
So, for instance:
__PACKAGE__->column_type(created => 'Date::Simple');
would make the result of your $obj->created() call be a Date::Simple
object rather than a plain string.
Other fixes and enhancements include:
- better MySQL autoincrement code (fixes occassional problems
under mod_perl) [Thanks to Tatsuhiko Miyagawa]
- fix for hasa() and create() with modified accessor/mutator names
(Thanks to Schwern)
- handle primary/foreign key value of zero better
(reported by Jim O'Brien)
- brought delete triggers in line with documentation
(reported by Barry Hoggard, fixed by Tatsuhiko Miyagawa)
- deprecated many methods to avoid clashing with potential column
names. These will remain until shortly before version 1.0 but
will issue warnings if used.
Available from CPAN, or
http://www.tmtm.com/CPAN/Class-DBI-0.89.tar.gz
Tony