[Catalyst] "Fat Model" Methodology?

Rodrigo rodrigolive at gmail.com
Fri Jan 22 20:31:55 GMT 2010

> Then, just define an extra type that corresponds to a Moose type, or
> just some basic rules (varchar/char =3D> Str, etc)
How about a metaclass? That way I could add DBIC metadata to my attributes.

Like this:

has 'name' =3D> (
    metaclass =3D> 'DBIC',
    is        =3D> 'rw',
    isa       =3D> 'Str',
    dbic =3D> { data_type =3D> 'varchar', size =3D> 50, ... }

The Moose class would probably need to inherit from DBIx::Class somehow, so
I can set the table name. But I guess this is just the opposite (use DBIC in
Moose) from what you're suggesting (use Moose in DBIC).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100122/499ec=

More information about the Catalyst mailing list