Using Cookies With Perl

Discussion in 'Perl Misc' started by James Hunt, May 24, 2004.

  1. James Hunt

    James Hunt Guest

    Does anyone have a good web reference for setting up and accessing cookies
    with Perl?

    - James Hunt
     
    James Hunt, May 24, 2004
    #1
    1. Advertising

  2. James Hunt

    Paul Lalli Guest

    Paul Lalli, May 24, 2004
    #2
    1. Advertising

  3. James Hunt

    krakle Guest

    "James Hunt" <> wrote in message news:<>...
    > Does anyone have a good web reference for setting up and accessing cookies
    > with Perl?
    >
    > - James Hunt


    This isn't a Perl question and has no excuse to be here.
    Right on Tad?
     
    krakle, May 25, 2004
    #3
  4. James Hunt

    Uri Guttman Guest

    >>>>> "k" == krakle <> writes:

    k> "James Hunt" <> wrote in message news:<>...
    >> Does anyone have a good web reference for setting up and accessing cookies
    >> with Perl?
    >>
    >> - James Hunt


    k> This isn't a Perl question and has no excuse to be here.
    k> Right on Tad?

    nope. you lose again. he asked a specific question about how to do
    something in perl. you ask for how to do sessions in apache. but you
    won't see the difference. just to emphasize the point, i will answer
    this query.

    get the LWP module (comes with 5.8+) and read its cookbook and some of
    it main docs (LWP.pm itself has a list of the other docs).

    in particular, the HTTP::Cookie module will show you how to create, send
    and get back cookies from a browser via the user agent. it is very
    simple to do. the harder part is actually maintaining a session and that
    requires some way of keeping state (the session itself) and some way of
    guiding the browser future requests to this session. this is usually
    done by keeping state in a server or on disk and using a cookie to map
    the user to the session. there are many ways to generate and manage
    cookies and how you tie them (and thereby the browser) to a session.

    so see how a direct question gets a direct answer? the OP partitioned
    the problem so it was about perl and not about the apache server. try to
    learn from this. but i think i saw some of your old posts dragged up so
    it seems you won't change. you are wrong but refuse to see it. stay
    blind but stay out of here.

    uri

    --
    Uri Guttman ------ -------- http://www.stemsystems.com
    --Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
    Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
     
    Uri Guttman, May 25, 2004
    #4
  5. James Hunt

    krakle Guest

    Uri Guttman <> wrote in message news:<>...
    > >>>>> "k" == krakle <> writes:

    >
    > k> "James Hunt" <> wrote in message news:<>...
    > >> Does anyone have a good web reference for setting up and accessing cookies
    > >> with Perl?
    > >>
    > >> - James Hunt

    >
    > k> This isn't a Perl question and has no excuse to be here.
    > k> Right on Tad?
    >
    > nope. you lose again. he asked a specific question about how to do
    > something in perl.


    Wrong I asked how to do sessions in Perl. You just went off topic in
    this guys thread. That's bad. Bad indeed.
     
    krakle, May 25, 2004
    #5
  6. James Hunt

    Tore Aursand Guest

    On Tue, 25 May 2004 11:21:46 -0700, krakle wrote:
    >>> This isn't a Perl question and has no excuse to be here.
    >>> Right on Tad?


    >> nope. you lose again. he asked a specific question about how to do
    >> something in perl.


    > Wrong I asked how [...]


    _You_ asked? The OP's name is "James Hunt".

    > [...] to do sessions in Perl.


    The OP's subject was:

    "Using Cookies With Perl"

    Cookies have nothing to do with sessions, other than the fact that you can
    use cookies to obtain session-like states across the HTTP protocol.


    --
    Tore Aursand <>
    "Then there was the man who drowned crossing a stream with an average
    depth of six inches." (W.I.E. Gates)
     
    Tore Aursand, May 25, 2004
    #6
  7. krakle <> wrote:
    > "James Hunt" <> wrote in message news:<>...
    >> Does anyone have a good web reference for setting up and accessing cookies
    >> with Perl?
    >>
    >> - James Hunt

    >
    > This isn't a Perl question and has no excuse to be here.



    This *is* a Perl question.

    "Is session mgt possible without cookies" is not a Perl question.

    The answer would be the same regardless of the language
    chosen for its implementation.


    > Right on Tad?



    You are wrong yet again. Nobody is surprised at that I'm sure.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, May 25, 2004
    #7
  8. krakle <> wrote:
    > Uri Guttman <> wrote in message news:<>...
    >> >>>>> "k" == krakle <> writes:

    >>
    >> k> "James Hunt" <> wrote in message news:<>...
    >> >> Does anyone have a good web reference for setting up and accessing cookies
    >> >> with Perl?
    >> >>
    >> >> - James Hunt

    >>
    >> k> This isn't a Perl question and has no excuse to be here.
    >> k> Right on Tad?
    >>
    >> nope. you lose again. he asked a specific question about how to do
    >> something in perl.

    >
    > Wrong I asked how to do sessions in Perl.



    No you didn't.

    You asked, in your characteristic sloppy English:

    Is there anyways I can implement a password protected members area
    with perhaps a persistent session without the use of cookies?

    The question was about HTTP, not about any programming language.


    > You just went off topic in
    > this guys thread.



    No he didn't.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, May 25, 2004
    #8
  9. James Hunt

    krakle Guest

    Tore Aursand <> wrote in message news:<>...
    > On Tue, 25 May 2004 11:21:46 -0700, krakle wrote:
    > >>> This isn't a Perl question and has no excuse to be here.
    > >>> Right on Tad?

    >
    > >> nope. you lose again. he asked a specific question about how to do
    > >> something in perl.

    >
    > > Wrong I asked how [...]

    >
    > _You_ asked? The OP's name is "James Hunt".
    >
    > > [...] to do sessions in Perl.

    >
    > The OP's subject was:
    >
    > "Using Cookies With Perl"
    >
    > Cookies have nothing to do with sessions, other than the fact that you can
    > use cookies to obtain session-like states across the HTTP protocol.



    He brought up a continueing bicker from another thread into this
    thread. Noone said cookies are sessions or whatever you are trying to
    get at.
     
    krakle, May 26, 2004
    #9
  10. James Hunt

    Uri Guttman Guest

    >>>>> "k" == krakle <> writes:

    k> Uri Guttman <> wrote in message news:<>...
    >> >>>>> "k" == krakle <> writes:

    >>

    k> "James Hunt" <> wrote in message news:<>...
    >> >> Does anyone have a good web reference for setting up and accessing cookies
    >> >> with Perl?
    >> >>
    >> >> - James Hunt

    >>

    k> This isn't a Perl question and has no excuse to be here.
    k> Right on Tad?
    >>
    >> nope. you lose again. he asked a specific question about how to do
    >> something in perl.


    k> Wrong I asked how to do sessions in Perl. You just went off topic in
    k> this guys thread. That's bad. Bad indeed.

    DING! DING! DING!!!!

    wow, you have no clue.

    uri

    --
    Uri Guttman ------ -------- http://www.stemsystems.com
    --Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
    Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
     
    Uri Guttman, May 26, 2004
    #10
  11. James Hunt

    James Hunt Guest

    wow amazing how a simple question can have such a response .....

    James Hunt

    "Uri Guttman" <> wrote in message
    news:...
    > >>>>> "k" == krakle <> writes:

    >
    > k> Uri Guttman <> wrote in message

    news:<>...
    > >> >>>>> "k" == krakle <> writes:
    > >>

    > k> "James Hunt" <> wrote in message

    news:<>...
    > >> >> Does anyone have a good web reference for setting up and accessing

    cookies
    > >> >> with Perl?
    > >> >>
    > >> >> - James Hunt
    > >>

    > k> This isn't a Perl question and has no excuse to be here.
    > k> Right on Tad?
    > >>
    > >> nope. you lose again. he asked a specific question about how to do
    > >> something in perl.

    >
    > k> Wrong I asked how to do sessions in Perl. You just went off topic in
    > k> this guys thread. That's bad. Bad indeed.
    >
    > DING! DING! DING!!!!
    >
    > wow, you have no clue.
    >
    > uri
    >
    > --
    > Uri Guttman ------ --------

    http://www.stemsystems.com
    > --Perl Consulting, Stem Development, Systems Architecture, Design and

    Coding-
    > Search or Offer Perl Jobs ----------------------------

    http://jobs.perl.org
     
    James Hunt, May 26, 2004
    #11
  12. James Hunt

    Tore Aursand Guest

    On Tue, 25 May 2004 16:25:31 -0700, krakle wrote:
    >> Cookies have nothing to do with sessions, other than the fact that you
    >> can use cookies to obtain session-like states across the HTTP protocol.


    > He brought up a continueing bicker from another thread into this thread.


    That really doesn't matter, as long as the OP asks how to do "it" in Perl.

    I could easily have been quite on-topic and asked how to create chocolate
    cookies with Perl.


    --
    Tore Aursand <>
    "When you see a good idea look for a better one. You should never play
    the first good move that comes into your head." (Bruce Pandolfine)
     
    Tore Aursand, May 26, 2004
    #12
  13. James Hunt

    krakle Guest

    Tore Aursand <> wrote in message news:<>...
    > On Tue, 25 May 2004 16:25:31 -0700, krakle wrote:
    > >> Cookies have nothing to do with sessions, other than the fact that you
    > >> can use cookies to obtain session-like states across the HTTP protocol.

    >
    > > He brought up a continueing bicker from another thread into this thread.

    >
    > That really doesn't matter, as long as the OP asks how to do "it" in Perl.
    >
    > I could easily have been quite on-topic and asked how to create chocolate
    > cookies with Perl.


    I wasn't referring to the original poster.....
     
    krakle, May 26, 2004
    #13
  14. >>>>> "James" == James Hunt <> writes:

    James> Does anyone have a good web reference for setting up and accessing cookies
    James> with Perl?

    Many people refer to my
    <http://www.stonehenge.com/merlyn/WebTechniques/col61.html> for "basic
    Cookie Management".


    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
     
    Randal L. Schwartz, May 27, 2004
    #14
  15. James Hunt

    GreenLight Guest

    (Randal L. Schwartz) wrote in message news:<>...
    > Many people refer to my
    > <http://www.stonehenge.com/merlyn/WebTechniques/col61.html> for "basic
    > Cookie Management".


    That is an interesting article.

    I have found, however, that the File::Cache module is not available on
    Win32 with ActiveState Perl 5.6x.

    Has anyone recoded Randall's cookie management technique to account
    for this shortcoming in AS Perl / Win32?
     
    GreenLight, May 27, 2004
    #15
  16. GreenLight <> wrote:

    > (Randal L. Schwartz) wrote in message
    > news:<>...
    >> Many people refer to my
    >> <http://www.stonehenge.com/merlyn/WebTechniques/col61.html> for
    >> "basic Cookie Management".

    >
    > That is an interesting article.
    >
    > I have found, however, that the File::Cache module is not
    > available on Win32 with ActiveState Perl 5.6x.
    >
    > Has anyone recoded Randall's cookie management technique to
    > account for this shortcoming in AS Perl / Win32?


    So just install File::Cache from CPAN, or better yet, install
    Cache::Cache and modify the code appropriately.
     
    David K. Wall, May 27, 2004
    #16
  17. James Hunt

    GreenLight Guest

    "David K. Wall" <> wrote in message news:<Xns94F6859D48FF8dkwwashere@216.168.3.30>...
    > GreenLight <> wrote:
    >
    > > That is an interesting article.
    > >
    > > I have found, however, that the File::Cache module is not
    > > available on Win32 with ActiveState Perl 5.6x.
    > >
    > > Has anyone recoded Randall's cookie management technique to
    > > account for this shortcoming in AS Perl / Win32?

    >
    > So just install File::Cache from CPAN, or better yet, install
    > Cache::Cache and modify the code appropriately.


    Yes, I used Cache::FileCache instead of File::Cache; it seemed to be a
    drop-in replacement, but I could be wrong 8^)
     
    GreenLight, May 28, 2004
    #17
  18. James Hunt

    krakle Guest

    Tad McClellan <> wrote in message news:<>...
    > krakle <> wrote:
    > > Uri Guttman <> wrote in message news:<>...
    > >> >>>>> "k" == krakle <> writes:
    > >>
    > >> k> "James Hunt" <> wrote in message news:<>...
    > >> >> Does anyone have a good web reference for setting up and accessing cookies
    > >> >> with Perl?
    > >> >>
    > >> >> - James Hunt
    > >>
    > >> k> This isn't a Perl question and has no excuse to be here.
    > >> k> Right on Tad?
    > >>
    > >> nope. you lose again. he asked a specific question about how to do
    > >> something in perl.

    > >
    > > Wrong I asked how to do sessions in Perl.

    >
    >
    > No you didn't.
    >
    > You asked, in your characteristic sloppy English: *etc. blah boo boo blah blah*


    Ok Tad no need to go off topic in this thread now. We have already
    went over all details in the other thread. Take care. :)
     
    krakle, May 31, 2004
    #18
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Nitulescu

    Response.Cookies vs Request.Cookies

    Alex Nitulescu, Feb 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    8,542
    Hans Kesting
    Feb 3, 2005
  2. Andy Fish
    Replies:
    3
    Views:
    6,558
    Fredrik Lindner
    Nov 6, 2003
  3. user
    Replies:
    3
    Views:
    683
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Mar 31, 2007
  4. archana
    Replies:
    1
    Views:
    520
  5. _Who
    Replies:
    7
    Views:
    2,722
Loading...

Share This Page