http://qs1969.pair.com?node_id=574414

barrycarlyon has asked for the wisdom of the Perl Monks concerning the following question:

Hey Fellow Monks

I want some advice regarding cookies, I have read some information on how to create them using the joys that is CPAN, but I would like to know the best module to use, and some sample code to write the cookie and any data in it

An example of what i want to do is:
Cookie Name: barrys_cookie
Data:
item_1yes
item_2Fudge
item_3((Unix or normal mysql)Timestamp)

Having read CPAN, (i cant remember which module it was), i usually have trouble trying to translate CPAN in to effective code

Bazza
Barry Carlyon barry@barrycarlyon.co.uk

Replies are listed 'Best First'.
Re: A question regarding cookies
by gellyfish (Monsignor) on Sep 22, 2006 at 18:00 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: A question regarding cookies
by marto (Cardinal) on Sep 22, 2006 at 18:03 UTC
    "I have read some information on how to create them using the joys that is CPAN, but I would like to know the best module to use, and some sample code to write the cookie and any data in it"

    I think the documentation provides an example you should be able to follow.

    Martin
Re: A question regarding cookies
by hgolden (Pilgrim) on Sep 22, 2006 at 17:53 UTC
    Hey

    One of the great things about CPAN is that it provides a lot of the code for you. Find the module that you think you need (perhaps CGI::Cookie), if you have questions about how to use it that either aren't in its documentation, or aren't clearly explained, ask again here and we'll be glad to help.

    Hays

    Update: Added module link

      CGI::Cookie is the utility module that CGI uses for cookies. So if you use the latter, you're actually depending on the former.

      If you don't use CGI, you can still use CGI::Cookie directly.

      See the CGI docs on cookies for how to use the module transparently.

A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.