File Coverage

blib/lib/EntityModel/EventLoop.pm
Criterion Covered Total %
statement 3 5 60.0
branch n/a
condition n/a
subroutine 1 3 33.3
pod 2 2 100.0
total 6 10 60.0


line stmt bran cond sub pod time code
1             package EntityModel::EventLoop;
2             # ABSTRACT: Abstract interface for managing eventloop objects for EntityModel
3             use EntityModel::Class {
4 3         33 _isa => [qw(Mixin::Event::Dispatch)],
5 3     3   3843 };
  3         98822  
6              
7             our $VERSION = '0.001';
8              
9             =head1 NAME
10              
11             EntityModel::EventLoop - not an event loop
12              
13             =head1 VERSION
14              
15             version 0.001
16              
17             =head1 DESCRIPTION
18              
19             Abstract framework for attaching event loops to L.
20              
21             This abstract class definition is implemented by various subclasses
22             (L). Normally none of these modules would be used directly:
23             other classes such as the L-derived async storage
24             backends will use them to obtain the relevant event loop object or to
25             queue tasks using whichever event loop happens to be available.
26              
27             Note that this is B an event loop implementation - if you're looking
28             for one of those, there are many options available: try L or L
29             perhaps.
30              
31             =cut
32              
33             =head2 defer
34              
35             Defers execution of the given code block.
36              
37             Instance method which expects a single coderef as parameter.
38              
39             =cut
40              
41 0     0 1   sub defer { die '->defer is abstract' }
42              
43             =head2 sleep
44              
45             Runs the given code block after an interval.
46              
47             Instance method which expects an interval (in seconds) and a single coderef.
48              
49             =cut
50              
51 0     0 1   sub sleep { die '->sleep is abstract' }
52              
53             1;
54              
55             __END__