Christopher H. Laco wrote:
So, let's reverse this.

I have a module that will be used in perl.

I want all subs in the module to share the stagte of one variable...in my case @context.

I also want any changes to @context to only effect the current user/request under mod_perl.

What's the best approach?

-=Chris

99% of the time...I'd put context in $self->{context} of a bless hash instance. But in my case, I'm dealing with a taglib that has stateless calls to parse_start/parse_end and I need to maintain state between those calls on each page request.

I do have a start_document sub, so if I always reset my @context = () in that, I should be fine. It's not like my @context is share umongst all apache child processes.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to