> -----Original Message-----
> From: darren chamberlain [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 8:34 AM
> To: [EMAIL PROTECTED]
> Subject: Re: %ENV
> 
> 
> Gene Dascher ([EMAIL PROTECTED]) said something to 
> this effect on 03/15/2001:
> > Well, with the subprocess_env(), I can see the key that I 
> set in my cgi now,
> > but the value that I set the key to is a Hash reference 
> that I need to use
> > in my cgi.  Unfortunately, all I get now is ENV{'TEST_VAR'} =
> > HASH(0x860a278), and I can't pull my values out.
> 
> I'm running into this as well, but with a different Apache::Table
> object. It seems that Apache::Table stringifies its values, which
> makes it useless for applications like this.

Apache::Table stringifies all of its values becuase it is really a C
structure in Apache (or somesuch - I'm not a C guy).   This is why notes()
(an Apache::Table object) can only hold string values and why pnotes is not
an Apache::Table object.  The Eagle book explains it pretty well.

pnotes is the way to go for non-string objects.  It is simple (unlike the
Data::Dumper example) and cleans itself up at the end of each request, which
is nice.

  my %hash = ();

  $r->pnotes(Foo => \%hash);

  my $href = $r->pnotes('Foo');

  my %old_hash = %$href;

HTH

--Geoff


Reply via email to