> > If you want a per-request global, use $r->pnotes() instead of a standard
> > perl global.  Then mod_perl *WILL* do it for you.
>
> True. But then you are using the Apache object and you're program
> doesn't work as a standard CGI anymore :(

I handle this by chekcing for $ENV{MOD_PERL} and just using a global for
storage if it isn't defined.

> Separating by namespace is not very convenient
> though. What I have been doing to get around this is that I wrote a
> simple module that can be used as a global scalar and that uses tie to
> return appropriate variable (FYI I've attached the module, if that
> interests anyone).

That's a good idea.  I've done similar things with accessor methods instead
of tied scalars.

- Perrin

Reply via email to