Revision: | 1.3 |
Committed: | Mon Jul 20 22:39:57 2009 UTC (15 years, 4 months ago) by root |
Content type: | application/x-troff |
Branch: | MAIN |
CVS Tags: | rel-5_28, rel-5_29, rel-5_21, rel-5_24, rel-5_26, rel-5_27, rel-5_12, rel-5_1, rel-5_0, rel-5_2, rel-5_22, rel-5_261, rel-5_201, rel-5_202, rel-5_11, rel-5_23, rel-4_86, rel-4_881, rel-4_88, rel-5_01, rel-5_111, rel-5_112, rel-5_271, rel-5_251, rel-4_91, rel-4_9 |
Changes since 1.2: | +1 -1 lines |
Log Message: | 4.86 |
# | Content |
---|---|
1 | # we avoid complicated tests here because some systems will |
2 | # not have working DNS |
3 | |
4 | BEGIN { eval q{use AnyEvent::Impl::Event;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Event not loadable}), exit 0) } |
5 | use AnyEvent::DNS; |
6 | |
7 | $| = 1; print "1..5\n"; |
8 | |
9 | print "ok 1\n"; |
10 | |
11 | AnyEvent::DNS::resolver; |
12 | |
13 | print "ok 2\n"; |
14 | |
15 | # make sure we timeout faster |
16 | AnyEvent::DNS::resolver->{timeout} = [0.5]; |
17 | AnyEvent::DNS::resolver->_compile; |
18 | |
19 | print "ok 3\n"; |
20 | |
21 | my $cv = AnyEvent->condvar; |
22 | |
23 | AnyEvent::DNS::a "www.google.de", sub { |
24 | print "ok 4 # www.google.de => @_\n"; |
25 | $cv->send; |
26 | }; |
27 | |
28 | $cv->recv; |
29 | |
30 | print "ok 5\n"; |
31 |