ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/05_dns.t
Revision: 1.5
Committed: Wed Dec 29 04:16:34 2010 UTC (13 years, 5 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-7_05, rel-7_07, rel-7_01, rel-7_02, rel-7_03, rel-7_08, rel-7_09, rel-7_16, rel-7_13, rel-7_11, rel-6_0, rel-6_1, rel-6_11, rel-6_12, rel-6_13, rel-7_15, rel-7_14, rel-7_12, rel-6_02, rel-6_01, rel-7_0, rel-5_3, rel-7_04, rel-5_31, rel-6_14, HEAD
Changes since 1.4: +2 -1 lines
Log Message:
first round of ioasync rewrite

File Contents

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