HTTP::Cookies cookie_jar %rest hash

From: bigDWK (daveGoogle_at_davewking.com)
Date: 09/29/04


Date: 28 Sep 2004 20:33:29 -0700


>From the HTTP::Cookies man page it shows this function

I believe I have the most current version of HTTP::Cookies (cpan tells
me I do).

$cookie_jar->scan( \&callback );
           The argument is a subroutine that will be invoked for
           each cookie stored in the $cookie_jar. The subroutine
           will be invoked with the following arguments:

             0 version
             1 key
             2 val
             3 path
             4 domain
             5 port
             6 path_spec
             7 secure
             8 expires
             9 discard
            10 hash

I can retrieve all this info, but i'm having problems getting the
values out of the hash that's returned. Here's my code

##########Code starts here, $c_jar has been filled with stuff from a
request###
 
$c_jar->scan(\&cookieCB);

sub cookieCB
{
     my($ver, $keyC, $valC, $path, $domain, $port, $path_spec,
$secure, $maxage, $discard, %attr) = @_;

     #then i do stuff with the values returned, all of these are
filled with values
     
     #now to the hash

     foreach my $key (keys(%attr))
     {
         print $key."\n";
     }
}

##############End of Code###############3

The above code prints "HASH(0x[SomeHexNumber])" instead of the value
of the key. Of cource if I try and reference the value with this key
I get a blank value every time. Any ideas?



Relevant Pages

  • Syntax to retrieve $# from de-referenced array
    ... I understand to retrieve the highest array subscript I use the ... what if the array is a reference held within a greater hash ...
    (comp.lang.perl.misc)
  • [Full-disclosure] Advisory 06/2005: Geeklog SQL Injection Vulnerability
    ... Hash: SHA1 ... Vendor Status: Vendor has released an updated version ... "Geeklog is a weblog powered by PHP and MySQL. ... With similiar strings it is possible to retrieve the complete ...
    (Full-Disclosure)
  • Re: virtue of salted passwords
    ... Password hashes can be retrieved in any number of ... > hash would also retrieve the salt at the same time. ... Any ideas as to how to make it harder to retrieve salts for web ...
    (alt.computer.security)
  • maintaining order in a hash (without Tie::IxHash)
    ... there exists a module on CPAN that solves a problem I'm ... However, regarding the problem of maintaining sort order of a hash, ... using this in addition to installation costs (where developers don't ...
    (comp.lang.perl.misc)
  • Re: How much data that bound form fetch at a time ?
    ... > Hash: SHA1 ... > The best way to reduce traffic is to only retrieve one record at a time. ... > Create a Search form that allows the user to create the criteria that ...
    (microsoft.public.access.adp.sqlserver)