; modperl
Subject: Re: Apache::Cookie
cap wrote:
Well, here's what I have to do to get direct access to values from the
original cookie hash:
my $cookies = Apache::Cookie-fetch;
my %hash = defined $cookies-{'session'} ? $cookies-{'session'}-value :
undef;
Strange. Thanks for the lead.
That's
On Tue, 2003-06-03 at 13:08, cap wrote:
it works just fine in my app, and 'just fine' maybe all that i need.
The point is, it shouldn't work. You should not be getting a hash.
What should work is this:
my $session = defined $cookies-{'session'} ?
$cookies-{'session'}-value : undef;
The
throw a warning or even an error without the defined
statement, but it gets past the immediate issue.
kirk
-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 10:57 AM
To: [EMAIL PROTECTED]
Cc: Stas Bekman; modperl
Subject: RE: Apache::Cookie
Have you consulted the documentation?
http://search.cpan.org/author/JIMW/libapreq-1.1/Cookie/Cookie.pm#value
cap wrote:
i have an application that uses CGI and sets the cookie values as a hashref.
im then attempting to retreive the values with Apache::Cookie with:
$cookies =
Yes, but:
use Apache::Cookie;
my $cookie = Apache::Cookie-fetch;
my @values = $cookie-value;
returns errors.
-Original Message-
From: Jason Galea [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 5:56 AM
To: [EMAIL PROTECTED]
Cc: modperl
Subject: Re: Apache::Cookie
Have you
On Mon, 2003-06-02 at 16:30, cap wrote:
Yes, but:
use Apache::Cookie;
my $cookie = Apache::Cookie-fetch;
my @values = $cookie-value;
returns errors.
The value() call isn't meant to be used with fetch(). Your original
example looked fine to me. What was not working about it? Did you
On Mon, 2003-06-02 at 09:05, cap wrote:
i have an application that uses CGI and sets the cookie values as a hashref.
im then attempting to retreive the values with Apache::Cookie with:
$cookies = Apache::Cookie-fetch;
$ccokies is a hashref so i should be able to get the individual values
:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 2:41 PM
To: [EMAIL PROTECTED]
Cc: modperl
Subject: Re: Apache::Cookie
On Mon, 2003-06-02 at 09:05, cap wrote:
i have an application that uses CGI and sets the cookie values
as a hashref.
im then attempting to retreive the values with Apache::Cookie
of uninitialized value in list assignment at -e line 1.
-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 2:41 PM
To: [EMAIL PROTECTED]
Cc: modperl
Subject: Re: Apache::Cookie
On Mon, 2003-06-02 at 09:05, cap wrote:
i have an application that uses CGI
Eric Sammer wrote:
What is weird is that the Apache::Cookie object DOES exist, it's just
the value
that's all wacked out or just plain missing.
I've had problems with scripts and mod_perl code before where I
inadvertently create
keys in a hash when I'm testing to see if they exist. I now
Rob Lambden wrote:
I've had problems with scripts and mod_perl code before where I
inadvertently create
keys in a hash when I'm testing to see if they exist. I now always use
something
Like:
i always use either defined or exists as appropriate to avoid these
errors. i've gotten bitten in the
Eric Sammer wrote:
the expire *i'm* specifying is just a relative '-1D' to cause the
browser to drop it. if there's a better way, i'm certainly open to
suggestions.
The HTTP headers do not support relative dates as far as I know. Thus
when you specify
a relative date the code must claculate
Hi Dave,
On Mon, 8 Oct 2001, Dave Rolsky wrote:
Apache::Cookie-new( $r,
-name = 'foo',
-value = { will_break = '', completely_borked = 1 } )-bake;
Have you tried doing
Apache::Cookie-new( $r,
-name = 'foo',
On Mon, 8 Oct 2001, Ged Haywood wrote:
Have you tried doing
Apache::Cookie-new( $r,
-name = 'foo',
-value = { wont_break = '1', not_at_all_borked = '' } )-bake;
instead?
I can hardly control the order in which values are written out to the
cookie via
On Fri, 15 Jun 2001, Rodney Broom wrote:
I've got this handler that calls Apache::Cookie-fetch, no problem. It's
tested and works fine. So I installed the same handler (same machine) on
a second Apache instance, but now Apache::Cookie-fetch fails, causing
the handler to terminate. No
I'd like to use Apache::Cookie, but I'm doing some tricky things with
cookie data, which requires that I do the encoding myself. However,
every time I 'bake' a cookie object, it tries to encode stuff for me. I
don't like this.
For example, if I've got cookie data that looks like 'foo%21',
But while Recovering the Cookie I got some errors:
$cookie_ref = Apache::Cookie-fetch;
any difference if you change that to:
my $r = Apache-request;
my $cookies = Apache::Cookie-new($r)-parse;
?
Hi!
get-cookie.html
--
%
use Apache::Cookie;
my $cookie_ref = Apache::Cookie-fetch;
my $conf_cookie = $cookie_ref-{conf};
my %hash = $conf_cookie-value;
^^^
thats it, now I understand!
many thanks, it was too late last night for me
perldoc Apache::Cookie says
value
Get or set the values of the cookie:
1.my $value = $cookie-value;
2.my @values = $cookie-value;
3.$cookie-value("string");
4.$cookie-value(\@array);
so if you set a array ref in 4 you retrieve
On Fri, 19 Nov 1999, John Siracusa wrote:
Apache::Cookie seems to have two different interfaces...or maybe there
are two different distributions of Apache::Cookie? Whatever it is, the
interface seems different on two machines here at work. One has 5.004
and one has 5.005, but that
20 matches
Mail list logo