You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jeff <ja...@aquabolt.com> on 2002/03/07 10:28:52 UTC

Can anyone recommend a good flavour of Cookie?

Please forgive a mod_perl wannabie [aka woza.PHP4.user]

I have googled two differing flavoured cookies in the
mod_perl recipe library:
  Apache::Cookie
  Apache::RequestNotes

and of course, there is the 'Why not hack the HTTP_COOKIE 
env all by your lonesome?' peppermint flavour too!

So which is it folks? Please vote for your favourite
flavour of cookie for poor woza.PHP4.user

Thanks in advance!

Jeff.

PS Any kind Debian soul might also include the name of the 
.deb containing said flavour?

PPS Not too keen on the taste of hysterical raisins.



Re: Can anyone recommend a good flavour of Cookie?

Posted by Robert Landrum <rl...@capitoladvantage.com>.
At 9:28 AM +0000 3/7/02, Jeff wrote:
>Please forgive a mod_perl wannabie [aka woza.PHP4.user]
>
>I have googled two differing flavoured cookies in the
>mod_perl recipe library:
>  Apache::Cookie
>  Apache::RequestNotes
>
>and of course, there is the 'Why not hack the HTTP_COOKIE
>env all by your lonesome?' peppermint flavour too!
>
>So which is it folks? Please vote for your favourite
>flavour of cookie for poor woza.PHP4.user
>

Actually, I always roll my own...  I can't stand those Apache::Cookie 
and CGI::Cookie modules... they never seem to work the way I expect 
them to.

Plus, decoding cookies is easy.

my %cookies = map {
	s/\%([A-F0-9]{2})/chr(hex($1))/eg;  split(/=/,$_,2);
} (split(/\&/,$ENV{'HTTP_COOKIE'}));

Rob

--
When I used a Mac, they laughed because I had no command prompt. When 
I used Linux, they laughed because I had no GUI.  

Re: Can anyone recommend a good flavour of Cookie?

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Jeff wrote:
> 
> Please forgive a mod_perl wannabie [aka woza.PHP4.user]
> 
> I have googled two differing flavoured cookies in the
> mod_perl recipe library:
>   Apache::Cookie

Apache::Cookie is a nice interface for cookies that is specific to the mod_perl environment.  it
parallels CGI::Cookie, except it is a C implementation so is a bit faster

>   Apache::RequestNotes

is a wrapper around Apache::Cookie (among other things)

> 
> and of course, there is the 'Why not hack the HTTP_COOKIE
> env all by your lonesome?' peppermint flavour too!

eeew, don't do that.  the whole point of Apache::Cookie, CGI::Cookie (and CPAN in general) is to
abstract out these things into modular components that are tried and true.  using Apache::Request or
CGI.pm for parsing GET and POST parameters (instead of reading from STDIN or $ENV{QUERY_STRING}) is
also the preferred way.

Recipes 3.5 and 3.7 in the mod_perl cookbook should be of some help.

welcome to mod_perl!  :)

--Geoff
<plug>
http://www.modperlcookbook.org/
</plug>

Re: [OT] Can anyone recommend a good flavour of Cookie?

Posted by Marcel Weber <mm...@ncpro.com>.
I prefer Chips Ahoi chocolate chips cookies, but the really chunky ones;-)

(sorry I could not help it...)

Marcel


Jeff wrote:
> Please forgive a mod_perl wannabie [aka woza.PHP4.user]
> 
> I have googled two differing flavoured cookies in the
> mod_perl recipe library:
>   Apache::Cookie
>   Apache::RequestNotes
> 
> and of course, there is the 'Why not hack the HTTP_COOKIE 
> env all by your lonesome?' peppermint flavour too!
> 
> So which is it folks? Please vote for your favourite
> flavour of cookie for poor woza.PHP4.user
> 
> Thanks in advance!
> 
> Jeff.
> 
> PS Any kind Debian soul might also include the name of the 
> .deb containing said flavour?
> 
> PPS Not too keen on the taste of hysterical raisins.
> 
> 
> 
> 
>