File: 01_basic.t

package info (click to toggle)
libanyevent-http-perl 2.25-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 248 kB
  • sloc: perl: 625; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
BEGIN { $| = 1; print "1..4\n" }

use AnyEvent::Impl::Perl;

require AnyEvent::HTTP;

print "ok 1\n";

my $cv = AnyEvent->condvar;

AnyEvent::HTTP::http_get ("http://nonexistant.invalid/", timeout => 1, sub {
   print "ok 3\n";
   $cv->send;
});

print "ok 2\n";
$cv->recv;
print "ok 4\n";