[Catalyst] Pushing new Model connections to loaded auth/sess Plugins

Gavin Henry ghenry at perl.me.uk
Sun Feb 25 08:39:32 GMT 2007


Dear all,

I'm have lot's of chained actions something like:

/user/*/login
/user/*/sitefunction1
/user/*/sitefunction2

etc.

Now the * will be a different userid, which corresponds to a different
user database.

When said user comes a long, I have a /user/base action that
CapturesArgs(1), using this I want to create a new
$c->model('Blah')->connect to their "db . userid" (checking it's numeric
of course etc.).

This is fine if I'm searching for data or updating things, but how can I
push this new connection back to the in-memory auth/session plugins that
call $c->model('blah'). For example when the user hits /user/*/login or
just sessions in general (every users auth/sess will be against their own
db).

Thanks,

Gavin.

-- 
Walking the road to enlightenment... I found a penguin and a camel on the
way..... Fancy a yourname at perl.me.uk? Just ask!!!
http://perlmonks.org/?node_id=386673



More information about the Catalyst mailing list