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]

After numerous developer versions, 0.90 of Class::DBI is now available.
It contains many bug fixes and tweaks and a few new concepts.

The major new changes are: (see the CHANGES file for a full list)

  - has_a as the new preferred syntax for 'inflation'-based
relationships, where a database value can be used either as a
foreign key to construct another Class::DBI object, or as a constructor
for other types of objects (Date::Simple, Time::Piece, URI, etc)
(a merger of the old hasa(), and column_type())

  - search() and search_like() can finally take multiple arguments

  - find_or_create() can be used to, erm, find or create a row.

  - has_many can now calling a mapping method on its results to simulate
    simple many-many joins

  - has_many creates an 'add_to_whatever' method for creating new
    relations: e.g.    
       CD->has_many(tracks => 'CD::Track');
       my $track = $cd->add_to_tracks(%track_details);

  - a before_create trigger can now modify the data that will be used

Available, as always, from:
  http://search.cpan.org/author/TMTM/Class-DBI-0.90/lib/Class/DBI.pm
or
  http://www.tmtm.com/CPAN/Class-DBI-0.90.tar.gz


An article showing some of the new features in action, and providing a
general introduction to Class::DBI is now also available on Perl.com:
  http://www.perl.com/pub/a/2002/11/27/classdbi.html

Tony

Reply via email to