Gossamer Forum
Home : General : Perl Programming :

LWP time out

Quote Reply
LWP time out
When using LWP, if the source is unavailable at the moment, it will try for 60 seconds to access that data. Is there a way to tell LWP to only try for like 10 seconds?
Quote Reply
Re: LWP time out In reply to
where $ua is defined as your user agent, use

$ua->timeout([$secs]);

-- Gordon --


------------------
$blah='82:84:70:77';
print chr($_) foreach (split/:/,$blah);

Quote Reply
Re: LWP time out In reply to
yeah, where you said to put it but it would just be
$ua->timeout([10]);
or
$sec = 10;
$ua->timeout([$sec]);
since the default time of $secs in UserAgent.pm is like over 100 seconds.

------------------
LookHard Search
lookhard.hypermart.net
Lavon Russell
Quote Reply
Re: LWP time out In reply to
Thanks for the feedback. Here is where I show my ignorance, for this is an area I am unfamiliar with. You say to define $ua as my user agent. "User Agent" means absolutely nothing to me. Can anyone enlighten me, or am I beyond help? Smile

Thanks again for all your feedback.