ASHISH MUKHERJEE ([EMAIL PROTECTED]) said something to this effect:
> Hey all, I am in need of some help. Can anyone pls. tell me how I can pass data from
>a Handler to a script ? Can any session data etc. withing a Handler be made
>accessible within a script ? Also, how can I pass data between Handlers invoked at
>different stages of request processing ? eg. how can I pass some data from an Init
>Handler to PerlHandler or from within a script to a Cleanup Handler
pnotes is your friend, it lets you pass arbitrary data around (even complex
data structures, or objects).
PerlModule Foo
<Location /foo>
SetHandler perl-script
PerlHandler Foo::content_handler
PerlInitHandler Foo::init_handler
PerlLogHandler Foo::log_handler
</Location>
package Foo;
sub init_handler {
my $r = Apache->request;
my $data = &_calculate("stuff");
$r->pnotes('data', $data);
return OK;
}
sub content_handler {
my $r = Apache->request;
my $data = $r->pnotes('data');
$r->print($data);
return OK;
}
sub log_handler {
my $r = Apache->request;
my $data = $r->pnotes('data');
$r->log->info($data);
return OK;
}
(darren)
--
I was thrown out of college for cheating on the metaphysics exam; I
looked into the soul of the boy sitting next to me.
-- Woody Allen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]