Don't set an environment variable. We're working within an OO
framework, so why not have a member that's been set aside for
plugin-to-plugin communication? It could be as simple as every plugin
registers that it's been loaded ... So, if you want to find out if a
given plugin is loaded, you do something like $self->is_plugin_loaded(
'Apache' ) or whatever. That way, we're not depending on an outside
framework like %ENV.

Plus, you would be able to remove yourself and have it be handled
gracefully. I don't know where this would be useful, but it's a nice
thing to have for free.

Rob


On Fri, 22 Oct 2004 11:25:10 -0400, William McKee <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 22, 2004 at 10:16:17AM -0400, Michael wrote:
> > I can have my plugin set the CGIAPP_PLUGIN_APACHE environment variable.
> > Then any other plugins can see that and act accordingly. For instance,
> > you could check for this env var before setting a cookie to either use
> > CGI.pm's cookie() or use Apache::Cookie(). Then you could either use
> > header_add() or query->header_out() to add it. Thoughts?
> 
> Hmm, I don't like the idea of setting environment values--seems like it
> could get messy. Why can't C::A::P::Cookie check the type of object that
> it gets from $self->query and behave accordingly?
> 
> 
> > This might actually be a way for all plugins to communicate with each
> > other. We had a previous discussion about whether some plugins might
> > want to be able to detect if others where there. For instance, an auth
> > and session plugin. Other thoughts?
> 
> I don't have any other bright ideas so setting an environment variable
> may be sufficient. However, in cases like this one, it seems far more
> effective to use data on hand instead of adding complexity to our
> applications.
> 
> 
> 
> 
> William
> 
> --
> Knowmad Services Inc.
> http://www.knowmad.com
> 
> ---------------------------------------------------------------------
> 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]
> 
>

---------------------------------------------------------------------
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