[Catalyst] Forcing model to reconnect with different connect_info
J. Shirley
jshirley at gmail.com
Thu Dec 10 22:23:05 GMT 2009
2009/12/10 Alex Povolotsky <tarkhil at over.ru>
> Hello!
>
> It's a bit of crazed setup, but I do have it; I have about 100
> identicaly-structured based with different conent.
>
> I think it's more reasonable to have one model and set dbname for each
> connect. However, I haven't found any way to force model to reconnect with
> different connect_info. Maybe someone knows the right handle?
>
> Alex.
>
>
Take a quick read of the Catalyst::Model::DBIC::Schema source, it's not too
hairy. You could simply use $c->model('DB')->schema directly, but if you
look at the code you could see that you can easily add in a "switch" method
that connects appropriately.
-J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091210/76f80=
e26/attachment.htm
More information about the Catalyst
mailing list