Joshua Chamas wrote:
> > Do you think there are any advantages to adding a "Get_Session" method to
> > $Application that will return a reference to the Session object with a given
> > ID?  e.g.
> >
> 
> Only if you do.  Why would you want to do such a thing ?  There
> may be other ways around your problem.

Well, I am writing a session monitor application, which monitors what's
happening in all the user sessions.  I want it to not only see what's going
on, but fix things for the user.  As in the context of a user(newbie) and
administrator.  I want the administrator to be able to physically fix the
things that the user has broken- in other words, have write access to
arbitrary user Sessions.

I suppose I could do it all through an Application->{SessionID} structure,
but then I wouldn't be using the Session object at all.  And I do have some
locking going on, which would make this very unwise.  There could be serious
bottleneck if everyone is just using Application, since Application->Lock
locks the whole shebang.


> 
> > my $sessobj = $Application->Get_Session("87c6039a20a50a01000a054b547add4b");
> > print $sessobj->{'foo'};
> >
> > That way I wouldn't have to go through all my code adding Session data to
> > Application. :)  How hard would implementing such a method be?
> >
> 
> Not terribly.
> 

Could I do it?  It seems this is the best solution for my problem.  Do you
think there's a better way?

- Adi

Reply via email to