I'm using the libcurl library with Perl, and have a need to use multiple curl handles. For example:
-----
#!/wms/bin/perl
use WWW::Curl::easy;
my $curl1 = WWW::Curl::easy->new();
my $curl2 = WWW::Curl::easy->new();
------
Unfortunately, each of these curl handles uses its own set of cookies. I need to share the cookie information between the two handles. I know that with the regular C libcurl library you can, but the perl interface doesn't seem to have access to it.
I am looking for either someone that knows how to access this interface through perl, or knows a another way to do this.
Some things to note:
- Using the COOKIEJAR or COOKIEFILE doesn't seem to help with this problem.
- The option to do this C is called CURLOPT_SHARE, but doesn't seem to do anything using it in Perl.
- In the real application, each curl handle is in its own thread. So the solution must be thread safe.
{{500 points refunded - PAQ - jmcg - EE Page Editor for Perl}}
Start Free Trial