On Tue, May 25, 2010 at 07:36:36AM -0700, Bill Moseley wrote: > 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' => 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?
You could also do "before setup => sub { ..." possibly in a trait. _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/