in reply to Re^2: WWW::Curl pause conflict
in thread WWW::Curl pause conflict

Hmm , try turning off safe signals, see Perl::Unsafe::Signals

Also try turning on cpan curl timeout , site:metacpan.org curl timeout , site:cpan.org curl timeout , -> https://metacpan.org/pod/WWW::Curl::Simple#connection_timeout-connection_timeout_ms/ https://metacpan.org/source/ANDREMAR/WWW-Curl-Simple-0.100191/lib/WWW/Curl/Simple.pm

if ($self->timeout_ms) { unless ($WWW::Curl::Easy::CURLOPT_TIMEOUT_MS) { croak( "Your trying to use timeout_ms, but your libcur +l is apperantly older than 7.16.12."); } $curl->setopt($WWW::Curl::Easy::CURLOPT_TIMEOUT_MS, $self- +>timeout_ms) if $self->timeout_ms; $curl->setopt($WWW::Curl::Easy::CURLOPT_CONNECTTIMEOUT_MS, + $self->connection_timeout_ms) if $self->connection_timeout_ms; } else { $curl->setopt(CURLOPT_TIMEOUT, $self->timeout) if $self->t +imeout; $curl->setopt(CURLOPT_CONNECTTIMEOUT, $self->connection_ti +meout) if $self->connection_timeout; }

http://search.cpan.org/grep?cpanid=SZBALINT&release=WWW-Curl-4.17&string=time&i=1&n=1&C=0

t/01basic.t 20:ok(! $curl->setopt(CURLOPT_TIMEOUT, 30), "Setting CURLOPT_TIMEOUT") +;

Replies are listed 'Best First'.
Re^4: WWW::Curl pause conflict
by krmx (Novice) on Sep 21, 2015 at 07:17 UTC
    Thanks for pointers. It seems related the way libcurl handles signal handlers within. I have played around by setting: CURLOPT_NOSIGNAL used to disable the timeouts while the name resolve takes place.
    $http->setopt(CURLOPT_NOSIGNAL, 1); while (1) { my stuff here ... ### Interval pause; }
    http://curl.haxx.se/libcurl/c/CURLOPT_NOSIGNAL.html This might not be smart if I really need to timeout, I think in for some reasons DNS calls are not functioning. I need to think.