For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > July 2005 > baking cookies









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author baking cookies
Dean A. Hoover

2005-07-26, 5:02 pm

In CGI.pm there is a function for making a cookie
from a scalar, hash, or array. It apparentley does
not support lists of lists, hashes of lists, etc.
Is there existing code that will do that?

Thanks.
Dean
Paul Lalli

2005-07-26, 5:02 pm

Dean A. Hoover wrote:
> In CGI.pm there is a function for making a cookie
> from a scalar, hash, or array.
> It apparentley does
> not support lists of lists, hashes of lists, etc.


There's no such thing as a list of lists, or a hash of lists. There
are lists of array references, and hashes of array references, however.

> Is there existing code that will do that?


To my knowledge, what you're looking for doesn't quite make sense. A
cookie can have one value, or a series of values. A series of series
of values is something altogether different.

Perhaps you should look into saving your complex data structure as one
large string? Have a look at the Storable module on CPAN.

Paul Lalli

Damian James

2005-07-26, 10:03 pm

On Tue, 26 Jul 2005 15:47:56 GMT, Dean A. Hoover said:
> In CGI.pm there is a function for making a cookie
> from a scalar, hash, or array. It apparentley does
> not support lists of lists, hashes of lists, etc.
> Is there existing code that will do that?


Look at Data::Dumper.

--Damian
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com