Hi:

The problem is in the tiny isolated subroutine below. This code is from cookie.pm

sub GetUserSessionCookie { warn("Entered GetUserSessionCookie Sessionname: '$sessionname'"); + # fetch existing cookies from cookie.pm CGI::Cookie - Interface to + HTTP Cookies my %cookies = CGI::Cookie->fetch; my $id = $cookies{'ID'}->value; my $sid = $id; warn($sid); $sid = 0; #for testing the rest of program. If I put in valid SI +D from #cookie recognizes user as logged on. return $sid; }

The error returned:

Can't call method "value" on an undefined value at /home/jalamior/www/httpsdocs/cgi-bin/lib/perl/manageusers.pm line 674.

Is that error because there is no cookie->id string recovered by the call or a problem with the call itself?

When I log in to https://www.jala-mi.org/httpsdocs/index.html

Firebug cookies shows

CGISESSID=16c11ce44ef8ffcfe6a5f0d74e4e0860; expires=Sun, 19 Mar 2017 00:47:22 GMT; path=/cgi-bin; domain=.www.jala-mi.org; Secure

Opening the edit dialog under Firebug shows cookies.edit.expire.label as the date/time the cookie was created and when I click Ok, the cookie disappears.

Log in again and new cookie with new date/time of creation in Firebug.

Don't know what this is.


In reply to Re^5: Cookie->fetch problem by tultalk
in thread Cookie->fetch problem by tultalk

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, details, 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, summary, 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.