1
我正在使用LWP :: UserAgent執行一個簡單的HTTP Post並獲取下面的錯誤。在網上進行了大量搜索之後,似乎有一段時間後出現了一個問題,這個問題已經解決。我的版本6.03應該被修復。任何想法爲什麼發生這種情況?LWP讀取失敗錯誤
'_content' => 'read failed: at /usr/local/share/perl/5.10.1/Net/HTTP/Methods.pm line 256
at /usr/local/lib/perl/5.10.1/Net/SSL.pm line 211
Net::SSL::die_with_error(\'LWP::Protocol::https::Socket=GLOB(0x8d9aa38)\', \'read failed\') called at /usr/local/lib/perl/5.10.1/Net/SSL.pm line 224
Net::SSL::read(\'LWP::Protocol::https::Socket=GLOB(0x8d9aa38)\', \'\', 1024, 0) called at /usr/local/share/perl/5.10.1/Net/HTTP/Methods.pm line 256
Net::HTTP::Methods::my_readline(\'LWP::Protocol::https::Socket=GLOB(0x8d9aa38)\', \'Status\') called at /usr/local/share/perl/5.10.1/Net/HTTP/Methods.pm line 343
Net::HTTP::Methods::read_response_headers(\'LWP::Protocol::https::Socket=GLOB(0x8d9aa38)\', \'laxed\', 1, \'junk_out\', \'ARRAY(0x8cd3d98)\') called at /usr/local/share/perl/5.10.1/LWP/Protocol/http.pm line 378
下面是代碼示例:
use LWP::UserAgent;
use Data::Dumper;
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
my $response = $ua->get('https://metacpan.org/module/LWP::UserAgent');
print Dumper($response);
您能否提供一個小代碼示例來演示如何引發錯誤。 – dgw 2012-01-29 17:35:58
當我運行這個代碼(LWP :: UserAgent :: VERSION 6.03)時,一切正常。 – dgw 2012-01-29 19:28:10
嗯,我檢查了所有相關軟件包是最新的。可能是盒子有問題? – MadHacker 2012-01-29 20:23:07