in reply to CGI::App::Session param not getting saved

How do you know the account_id isn't saved? Please explain in detail.
  • Comment on Re: CGI::App::Session param not getting saved

Replies are listed 'Best First'.
Re^2: CGI::App::Session param not getting saved
by bradcathey (Prior) on Jan 24, 2007 at 00:37 UTC

    Good question (sorry, I'm not sure how much to expound on this one).

    I know it isn't being saved because I am able to view the contents of the record of the session in MySQL. Those records without any print statement show no 'account_id' language at all. Those with the print statements show account_id => 2, or whatever number.

    Hope this helps


    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
      bradcathey,
      Are you calling the flush() method explicitly or are you letting the object do it for you in DESTROY? I ask because the docs refer to a ticket complaining that in some cases, session data is not saved unless called explicitly. It is interesting that the behavior is inconsistent.

      Try flush() in the teardown method.

      Cheers - L~R

        Actually Limbic~Region, I am calling flush() in the tear down, but not in that module (there is a redirect from where I am setting the account_id. It happens in a latter module as the user exits the checkout process in an e-comm site.

        I think the next thing to try is exiting before the redirect to see if it's happening before or after that.


        —Brad
        "The important work of moving the world forward does not wait to be done by perfect men." George Eliot