Suppressing "Day too big" warning in Perl LWP::UserAgent -
I have a fairly simple Perl script that uses the LWP :: User Agent module to redirection to find the final destination URL. To follow the URL from The problem is that the script shows periodical warnings that look like this:
day too big - 25592 & gt; 24855 sec too small - 25592 & lt; 74752 sec too large - 25592 & gt; 11647 days too large - 25592 & gt; 24855 sec too small - 25592 & lt; 74752 sec too large - 25592 & gt; 11647
This does not provide any other details as to why it is happening or which module is causing this issue, but I am pretty sure that this LWP :: UserAgent
I am starting the agent using the following code:
Use LWP :: UserAgent; My $ ua = LWP :: UserAgeent-> New (Cookie_organizer => {}, request_redirectable => []); $ Ua- & gt; Agent ('Mozilla / 5.0 (X11; U; FreeBSD i386; N-US; RV .: 9.9.9.9) Gecho / 2007/99 99 Firefox / 2.0.0.1'); $ UA- & gt; Timeout (10);
I searched online and found only one result which was the following thread that was never resolved. Thread Writer thought that this warning is somehow related to cookie dates, which has been captured by the LWP :: UserAgevent module.
The warning does not affect the screenplay, but I would appreciate any help in better understanding what might be the issue and how it can be solved or reduced Press less warning message than. Thank you in advance for your assistance!
If upgrading is not an option for you, you should always always have local $ Filter alerts by using the SIG {__ Warn_ __}
handler.
{local $ SIG {__WARN__} = sub {warning @_ until $ _ [0] = ~ m (^. * Also (?: Big | small)); }; # Your code here }
Comments
Post a Comment