On Wednesday 24 January 2007 16:30, James R. Leu wrote: > This seems to work, but it feels wrong. Is there a better way > to go about changing the Model attributes on the fly per user.
Looks fine to me. The main thing is that reconnecting to the database is pretty inefficient, so it's intentionally hard to do. You might be better off rethinking your approach. Perhaps wrapping the tables with stored procs to enforce access control would work? Then you'd only have to connect once, and it would probably be easy to get DBIC to silently pass @USERNAME=$c->user on every query. I'm sure how well relations would work in that case, though. Regards, Jonathan Rockway -- package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do { $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //, ";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
pgpXZxNz2E8sT.pgp
Description: PGP signature
_______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/