On Wed, 16 Mar 2005 19:50:10 -0800, Peter Fogg <[EMAIL PROTECTED]> wrote:
> Cees wrote:
> 
> "
> use CGI::Session qw/-ip-match/;
> use CGI::Application::Plugin::Session;
> "
> 
> which highlights something that I don't yet understand: that I can
> "use" the Session plugin
> and the non-plugin Session simultaneously and they don't conflict with
> each other. I used
> the suggestion and it worked.

The plugin doesn't replace or try to hide CGI::Session, it just makes
it easier to use.  Buy using CGI::Session directly, you just have to
do a little bit more work.

The reason the above trick works is a side-effect of how CGI::Session
implements the -ip-match feature.  When you pass it the -ip-match
parameter, CGI::Session sets a Class variable called $IP_MATCH (fully
qualified that would be $CGI::Session::IP_MATCH).  Since it is set as
a class variable, anytime you use the CGI::Session module after this
point in your code the $IP_MATCH variable will still be set.  So when
the session plugin creates a new session, the $IP_MATCH variable is
set and takes effect.

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to