[Dbix-class] minimalistic Moose / DBIC glue module

Chris Weyl cweyl at alumni.drew.edu
Fri May 28 23:07:55 GMT 2010


On Tue, May 25, 2010 at 12:28 PM, BUCHMULLER Norbert <norbi.lists at nix.hu> wrote:
> Hi Guys,
>
> at the company where I work we are trying to make DBIC and Moose
> befriend: ie. making the Result (Row) objects regular Moose objects (as
> much as reasonable), so that we can use type constraints, triggers, ... on
> columns as if they were normal attributes.

This might be a touch simplistic, but could what you're trying to do
be also achievable by using method modifiers via
Class::Method::Modifiers (::Fast, too)?  I realize it's not what
you're going for (full-blown DBIC on Moose), but it would seem to
enable what you want -- e.g. triggers and type constraint checking in
the form of before or after modifiers on the accessors; coercion via
around -- without doing quite as much violence to the underlying
structure.

                                            -Chris

-- 
Chris Weyl
Ex astris, scientia



More information about the DBIx-Class mailing list