This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: how to set more then one cookie From: "Matthias Hanns" <mh@ncsc.de> Date: Fri, 25 Aug 2000 17:19:13 +0200 Hi all together, when I want to set one cookie I use the following way: ... my $cookie = CGI::cookie( ... ); # or with OO: my $q = new CGI; my $cookie = $q->cookie( ... ); ... print CGI::header($cookie); ... Now my question: How I can set more then one cookie? Any hints, where I can read or how to do? Thnx, Matthias === Subject: RE: how to set more then one cookie From: Geoffrey Young <gyoung@laserlink.net> Date: Fri, 25 Aug 2000 11:26:01 -0400 well, since this is the mod_perl mailing list :) my $r = Apache->request; $r->headers_out->add('Set-Cookie' => "cookie a stuff"); $r->headers_out->add('Set-Cookie' => "cookie b stuff"); should work ok... HTH === Subject: Re: how to set more then one cookie From: Alex Menendez <amen@hotbacon.com> Date: Fri, 25 Aug 2000 08:45:10 -0700 you can also use Apache::Cookie and do something like this: my $cookie = Apache::Cookie->new($r, -name => 'q_string', -value => $value, -expires => '+3h', -path => '/' ); $cookie->bake; my $cookie2 = Apache::Cookie->new($r -name => 'name2', -value => $value2, -expires => '+3h', -path => '/' ); $cookie2->bake; === Subject: RE: how to set more then one cookie From: Geoffrey Young <gyoung@laserlink.net> Date: Fri, 25 Aug 2000 11:53:56 -0400 just to note for the newer users, Apache::Cookie is part of libapreq, not the standard mod_perl package... you can get it at http://www.perl.com/CPAN-local/modules/by-module/Apache/libapreq-0.31.tar.gz or any other CPAN mirror... ===