WWW::Curl::Share - Perl extension interface for libcurl
use WWW::CURL::Share; my $curlsh = new WWW::Curl::Share; $curlsh->setopt(CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE); $curlsh->setopt(CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS); $curl->setopt(CURLOPT_SHARE, $curlsh); $curlsh->setopt(CURLSHOPT_UNSHARE, CURL_LOCK_DATA_COOKIE); $curlsh->setopt(CURLSHOPT_UNSHARE, CURL_LOCK_DATA_DNS);
WWW::Curl::Share is an extension to WWW::Curl::Easy which makes it possible to use single cookies/dns cache for several Easy handles.
$curlsh = new WWW::Curl::Share This method constructs a new WWW::Curl::Share object. $curlsh->setopt(CURLSHOPT_SHARE, $value ); Enables share for: CURL_LOCK_DATA_COOKIE use single cookies database CURL_LOCK_DATA_DNS use single DNS cache $curlsh->setopt(CURLSHOPT_UNSHARE, $value ); Disable share for given $value (see CURLSHOPT_SHARE) $curlsh->strerror( ErrNo ) This method returns a string describing the CURLSHcode error code passed in the argument errornum. $curl->setopt(CURLOPT_SHARE, $curlsh) Attach share object to WWW::Curl::Easy instance List of all available options and lock constants: CURLSHOPT_LAST CURLSHOPT_LOCKFUNC CURLSHOPT_NONE CURLSHOPT_SHARE CURLSHOPT_UNLOCKFUNC CURLSHOPT_UNSHARE CURLSHOPT_USERDATA CURL_LOCK_DATA_CONNECT CURL_LOCK_DATA_COOKIE CURL_LOCK_DATA_DNS CURL_LOCK_DATA_LAST CURL_LOCK_DATA_NONE CURL_LOCK_DATA_SHARE CURL_LOCK_DATA_SSL_SESSION
Anton Fedorov (datacompboy <at> mail.ru)
Copyright (C) 2004 Sebastian Riedel, et al.
You may opt to use, copy, modify, merge, publish, distribute and/or sell copies of the Software, and permit persons to whom the Software is furnished to do so, under the terms of the MPL or the MIT/X-derivate licenses. You may pick one of these licenses.
WWW::Curl, WWW::Curl::Easy, http://curl.haxx.se/
To install WWW::Curl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Curl
CPAN shell
perl -MCPAN -e shell install WWW::Curl
For more information on module installation, please visit the detailed CPAN module installation guide.