Title: Persisting data across handlers

Hi,

I'd like to create an object in the PerlChildInitHandler and allow access to this object in various PerlResponseHandlers.  What's the best way to do this? 

I created a bucket brigade in childinit and associated it with the child pool and put the object on it. I don't know how to access this bucket brigade from a response handler. Here's the childinit handler:

sub child_init {
    my ($cp, $s) = @_;

    my $foo = 42;
    $ba = APR::BucketAlloc->new($cp);
    my $bb = APR::Brigade->new($cp, $ba);
    my $b = APR::Bucket->new($ba, $foo);
    $bb->insert_head($b);

    return OK;
}

Help greatly appreciated.

cheers,
vipul

Reply via email to