Re: Reading err_headers_out values
[prev]
[thread]
[next]
[Date index for 2005/04/21]
At first look, it makes sense -- '1st while' is dealing with the scalar
reference, '2nd while' is reading it into a hash
but then i notice that there are 3 oranges, and 1 lemon
now i feel a few pieces short of a fruit salad.
(drum roll, please)
sorry, i didn't have my morning espressos today.
this makes no sense to me, as neither seem to be working
whenever i end up in something like this, i make extensive use of
Data::Dumper, and trace the hell out of my data structures to figure
out how their internal structure
also, as a note, i created my own cookie class -- well actually not a
class, but a couple of functions that probably should have been a
class. it lets me define how i want to handle cookies, then dispatches
the incoming cookie data to the right class and functions. i did it to
easily switch between the bake and headers out stuff. its not all too
messy, and i can switch stuff in one place to redefine all my cookies
(as all my cookie functions exist as building a data hash and
dispatching it to this central cookie cutter.
On Apr 21, 2005, at 3:14 PM, ted wrote:
> my $h = $r->err_headers_out();
> warn "1st while ...\n";
> while (my($k, $v) = each %$h) { warn "k = $k v = $v\n"; }
>
> my %h = $r->err_headers_out();
> warn "2nd while ...\n";
> while (my($k, $v) = each %h) { warn "k = $k v = $v\n"; }
>
> -------------------------------
> Output:
>
> 1st while ...
> k = Set-Cookie v = oranges=1; path=/
> k = Set-Cookie v = oranges=1; path=/
> k = Set-Cookie v = oranges=1; path=/
> 2nd while ...
> k = Set-Cookie v = lemons=1; path=/
>
 |
 |
Re: Reading err_headers_out values
Jonathan Vanasco 20:01 on 21 Apr 2005
|