in reply to setting cookies www::mechanize

I don't know if this will solve your problem, but I notice that you are missing a comma after the first -path=>'/'.

Replies are listed 'Best First'.
Re^2: setting cookies www::mechanize
by myyellowshoe (Initiate) on Dec 09, 2007 at 04:01 UTC
    No, but thank you :D didn't notice that! Its amazing it didn't throw an error.

      A quick pass through B::Deparse explains what's happening:

      perl -MO=Deparse,-p < 1 > 17:18:46 $mech->cookie_jar->set_cookie(-name=>'PersistentZipCode', -value=>'15213', -host=>'www.kbb.com', -expires=>'Thu, 04 Dec 2008 18:23:16 GMT', -path=>'/' -secure=>'false'); $mech->cookie_jar->set_cookie((-'name'), 'PersistentZipCode', (-'value +'), '15213', (-'host'), 'www.kbb.com', (-'expires'), 'Thu, 04 Dec 200 +8 18:23:16 GMT', (-'path'), ('/' - 'secure'), 'false');

      I couldn't explain exactly why it's picked this way to parse, but you can see what's happened and why it's not throwing a syntax error though.

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.