File Coverage

File:lib/ZMQx/Class/AnyEvent.pm
Coverage:100.0%

linestmtbrancondsubtimecode
1package ZMQx::Class::AnyEvent;
2
2
2
2
386
2
40
use strict;
3
2
2
2
5
1
35
use warnings;
4
2
2
2
29
3
38
use 5.010;
5
6# ABSTRACT: AnyEvent helpers
7
8
2
2
2
1006
5002
88
use AnyEvent;
9
10sub watcher {
11
4
8071
    my ($class, $socket, $callback) = @_;
12
4
51
    my $fh = $socket->get_fh;
13
4
302
    my $watcher = AnyEvent->io (
14        fh => $fh,
15        poll => "r",
16        cb => $callback
17    );
18
4
114
    return $watcher;
19}
20
211;