Drew Taylor wrote: > Hi, > We just switched from CDBI to DBIC (.06999_07) for a webapp project > and I have a couple questions: > > 1) For one of the classes, I want the equivalent of CDBI's TEMP > columns or some other sort of bucket to place temporary data that will > never hit the database. I see that DBIx::Class uses > Class::Data::Accessor - but it appears to be class (not > object)-oriented.
Class::Data::Accessor is one of those couldn't-find-a-better-name
modules; compound with the fact that we have way too many disparate
accessor type modules on CPAN.
It is indeed class AND object aware. Set at the class level, object
level inherits from class, and set object level on it's own if you wish.
It is literally the same as Class::Data::Inheritable, but it's also
object aware.
__PACKAGE__->mk_classaccessors(qw/foo bar baz/);
I would also recommend looking at Class::Accessor::Grouped. It allows
you to create grouped simple (class data) or inherited (like C::D::A)
accessor data.
__PACKAGE__->mk_group_accessors('inherited', qw/foo bar baz/);
-=Chris
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
