> 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', it
> emerges from 'bake' looking like 'foo%2521'.  Is there any way to
> prevent this behavior?

First of all,
reading the cookie value in should reverse the weirdness (encoding)
that ->bake is doing.

Second of all,
if it's still a problem, you can either
A) design your cookie string to NOT use those characters (like, if % is a
separator, choose a : or something),
B) use Storable / MIME::Base64 / UUEncode ( which is as simple as pack('u',
$val) ! ) , or
C) encode it yourself.

Hope this helps!

L8r,
Rob

Reply via email to