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

Like this:

has 'name' => (
    metaclass => 'DBIC',
    is        => 'rw',
    isa       => 'Str',
    dbic => { data_type => 'varchar', size => 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).

-rod
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to