ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/68_poe_05_dns.t
Revision: 1.2
Committed: Thu Apr 23 22:44:30 2009 UTC (15 years, 1 month ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-4_4, rel-4_45, rel-4_41, rel-4_42, rel-4_412, rel-4_81, rel-4_411, rel-4_8
Changes since 1.1: +1 -0 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 $|=1;
2 root 1.2 $^W=0;
3 root 1.1 BEGIN { print "1..5\n" }
4    
5     # we avoid complicated tests here because some systems will
6     # not have working DNS
7    
8     use AnyEvent::Impl::POE;
9     use AnyEvent::DNS;
10    
11     print "ok 1\n";
12    
13     AnyEvent::DNS::resolver;
14    
15     print "ok 2\n";
16    
17     # make sure we timeout faster
18     AnyEvent::DNS::resolver->{timeout} = [0.5];
19     AnyEvent::DNS::resolver->_compile;
20    
21     print "ok 3\n";
22    
23     my $cv = AnyEvent->condvar;
24    
25     AnyEvent::DNS::a "www.google.de", sub {
26     print "ok 4 # www.google.de => @_\n";
27     $cv->send;
28     };
29    
30     $cv->recv;
31    
32     print "ok 5\n";
33