9

Debian Wheezy (perl 5.14)

いい仕事:

use LWP::Simple;
print get( 'http://ip6-localhost:80' );

動かない(1)

use LWP::Simple;
print get( 'http://[::1]:80' );

動作しない(2) [Return: Bad hostname ]

use LWP::Simple;
$ua = new LWP::UserAgent();
my $req = new HTTP::Request("GET", "http://[::1]/");
my $res = $ua->request($req);

動作しない(3) [戻る:接続が拒否されました]

use Net::INET6Glue::INET_is_INET6;
use LWP::Simple;
$ua = new LWP::UserAgent();
my $req = new HTTP::Request("GET", "http://[::1]/");
my $res = $ua->request($req);

なぜ必要なのですか?ldirectord がそれを必要とするためです。:( なにか提案を?

4

1 に答える 1

1

INET6Gluの使用を提案した別の投稿

use Net::INET6Glue::INET_is_INET6;
use LWP::Simple;
print get( 'http://[::1]:80' );
print get( 'http://ipv6.google.com' );
于 2012-09-15T00:49:02.940 に答える