You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Praveen Ray <pr...@crcnet1.com> on 2003/09/29 23:52:31 UTC
Re: How to attach a hashref or other data to the request object?
Try the pnotes method:
$r->pnotes(MyHash => $your_session_hash);
then later in other handlers...
my $sess_hash = $r->pnotes('MyHash');
On Mon, 2003-09-29 at 17:53, Matisse Enzer wrote:
> Is there an appropriate way in mod_perl 2 for me to take a hashref
> and somehow add it to the Apache request object so that Perl code
> later in the request handling process can access it, for example with:
> my $hash = $r->{OurHash};
> or something like that?
>
> Specifcally what i am trying to do is to take a hash created using
> Apache::Session (a tied hash) and have a reference to that hash be
> available in the Apache request object for the rest of the request's
> lifetime.