#! /usr/bin/env perl
# SUPER on run-time loaded IO::Socket does not find compiled IO::Handle->autoflush
# major walker rewrite
# also test that -O3 warnings will not crash when being written to at run-time
use
strict;
BEGIN {
unshift
@INC
,
't'
;
}
use
Test::More;
plan
skip_all
=>
"require Net::DNS and IO::Socket::INET6"
;
exit
(0);
}
plan
tests
=> 1;
# TODO: still prints compile-time Carp reloading cruft
ctestok(1,
'C,-O3'
,
'ccode340i'
, <<
'EOF'
,
'C #340 inc cleanup'
);
eval
q/use Net::DNS/
;
my
$new
=
"IO::Socket::INET6"
->can(
"new"
) or
die
"die at new"
;
my
$inet
=
$new
->(
"IO::Socket::INET6"
,
LocalAddr
=>
q/localhost/
,
Proto
=>
"udp"
,
LocalPort
=>
undef
);
q(ok)
if
ref
(
$inet
) eq
"IO::Socket::INET6"
;
EOF