Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
These issues seem to be related to the cache

How did you to come to this conclusion?

Upon casual examination of your code fragment, I notice you're mixing CGI::redirect with CGI::Sessions::header, well that is never going to work, because HTTP header only get sent once.

You can't have a session without a sid.

You can only pass a sid through, cookie, url param, or form param.

Your use of CGI::Session::header suggests you want to use the cookie way, but you don't send any cookies when you use CGI::redirect

$ perl -MCGI -MCGI::Session -MDDS -le " Dump( CGI::Session->new->heade +r ); " $VAR1 = "Set-Cookie: CGISESSID=7259a9a49c42fea87376be33478731b8; path= +/\r\nDate: Mo". "n, 23 May 2011 17:40:06 GMT\r\nContent-Type: text/html; chars +et=ISO-8859-1". "\r\n\r\n"; $ perl -MCGI::Session -MDDS -le " Dump( CGI->redirect )" $VAR1 = "Status: 302 Found\r\nLocation: http://localhost\r\n\r\n";
See CGI::Session::Tutorial, Ovid's CGI Course

Here is monkey patch

use CGI::Session; sub CGI::Session::redirect { my $self = shift; return $self->query->redirect(-cookie => $self->cookie, @_ ); } use DDS; Dump( CGI::Session->new->redirect ); __END__ $VAR1 = "Status: 302 Found\r\nSet-Cookie: CGISESSID=a19147247f0207a6c3 +14b5aadc7c232". "a; path=/\r\nDate: Mon, 23 May 2011 17:46:15 GMT\r\nLocation: + http://localho". "st\r\n\r\n";

In reply to Re: CGI::Session "cache" issue by Anonymous Monk
in thread CGI::Session "cache" issue by Zhris

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [Cosmic37]: I'm wondering whether there is a specific/(or at least "usual") command or does one take a copy before undefining and then copy it back after slurping file into a string?
    [BarApp]: I need help accessing perl files. I need permission!!!
    [Cosmic37]: I wish thee a peachy life and express gratitude for considering my pathetic questions
    [erix]: record separator
    [Cosmic37]: Permissions are interesting earthlings. Did nature determine who gives permission and who asks permission. Who was the first to get permission? Are you not related to them as one big earthling family?
    [karlgoethebier]: Cojones! We need cojones!
    [karlgoethebier]: Ouch! Permissions! We need permissions!

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (8)
    As of 2017-06-29 16:39 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How many monitors do you use while coding?















      Results (672 votes). Check out past polls.