> In a Mason context, which is where I'm using it, I do this in my
> top-level autohandler (ignore the main:: subroutines, they're just for
> pedagogy):
>
>
> <%init>
> # 'local' so it's available to lower-level components
> local *session;
>
> my $dbh = &::get_dbh;
> my $session_id = &::get_cookie('_session_id');
> tie %session, 'Apache::Session::MySQL', $session_id,
> {Handle => $dbh, LockHandle => $dbh};
> ...
> </%init>
Geez, that's awfully confusing to look at (local and typeglobs is not a
newbie-friendly combo). Isn't there a simpler way? What about putting
it in pnotes?
- Perrin