line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
24
|
|
|
24
|
|
76
|
use strict; |
|
24
|
|
|
|
|
27
|
|
|
24
|
|
|
|
|
628
|
|
2
|
|
|
|
|
|
|
package Event::idle; |
3
|
24
|
|
|
24
|
|
72
|
use Carp; |
|
24
|
|
|
|
|
21
|
|
|
24
|
|
|
|
|
1021
|
|
4
|
24
|
|
|
24
|
|
80
|
use base 'Event::Watcher'; |
|
24
|
|
|
|
|
23
|
|
|
24
|
|
|
|
|
1454
|
|
5
|
24
|
|
|
24
|
|
98
|
use vars qw($DefaultPriority @ATTRIBUTE); |
|
24
|
|
|
|
|
24
|
|
|
24
|
|
|
|
|
4141
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
@ATTRIBUTE = qw(hard max min); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
'Event::Watcher'->register; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
|
|
|
|
|
|
# lock %Event::; |
13
|
|
|
|
|
|
|
|
14
|
13
|
|
|
13
|
0
|
20
|
my $class = shift; |
15
|
13
|
|
|
|
|
37
|
my %arg = @_; |
16
|
13
|
|
50
|
|
|
687
|
my $o = allocate($class, delete $arg{attach_to} || {}); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# deprecated |
19
|
13
|
|
|
|
|
33
|
for (qw(min max repeat)) { |
20
|
39
|
50
|
|
|
|
87
|
if (exists $arg{"e_$_"}) { |
21
|
0
|
|
|
|
|
0
|
carp "'e_$_' is renamed to '$_'"; |
22
|
0
|
|
|
|
|
0
|
$arg{$_} = delete $arg{"e_$_"}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
13
|
50
|
33
|
|
|
71
|
$o->repeat(1) if defined $arg{min} || defined $arg{max}; |
27
|
13
|
|
|
|
|
74
|
$o->init(\%arg); |
28
|
13
|
|
|
|
|
46
|
$o; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |