Re: Can't call soup_cookie_parse() through GIR

On 03.12.2011 12:46, Emmanuel Rodriguez wrote:
     HTTP::Soup::Cookie->parse($value, undef);
     HTTP::Soup::Cookie->parse($value, HTTP::Soup::URI->new('/'));


libsoup documentation says that soup_cookie_parse is a function and
that the URI parameter can be NULL. I don't understand where the
blessed reference is supposed to go.

Since it's a function, try

  HTTP::Soup::Cookie::parse($value, undef);
  HTTP::Soup::Cookie::parse($value, HTTP::Soup::URI->new('/'));

The '->' causes the package name to be passed to the invoker which thus sees $value where it expects the URI. Yeah, our error messages need a lot of improvements. Patches welcome, of course.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]