[Catalyst] Catalyst::Model::DBIC::Schema and dbh_maker

Bill Moseley moseley at hank.org
Tue May 25 14:36:36 GMT 2010


I would like my Catalyst::Model::DBIC::Schema model class to be able to
inspect the configuration and modify connect_info.  Specifically, based on a
flag in the config either pass connect_info unmodified or replace
dsn/user/password with a dbh_maker sub.

What seems to work ok is to use "before ' COMPONENT' =3D> sub {}" and simply
modify the passed in arguments.  I do not have any config in the model class
that I need to worry about merging with the passed in arguments.

Is this a reasonable way to do this?



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100525/963f8=
8b3/attachment.htm


More information about the Catalyst mailing list