line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
866
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
2
|
|
|
|
|
|
|
package Event::generic; |
3
|
1
|
|
|
1
|
|
5
|
use base 'Event::Watcher'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
96
|
|
4
|
1
|
|
|
1
|
|
6
|
use vars qw(@ATTRIBUTE); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
266
|
|
5
|
|
|
|
|
|
|
@ATTRIBUTE = qw(source); |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
'Event::Watcher'->register; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
|
|
|
|
|
|
# lock %Event::; |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
1
|
4
|
my $class = shift; |
13
|
2
|
|
|
|
|
7
|
my %arg = @_; |
14
|
2
|
|
50
|
|
|
99
|
my $o = allocate($class, delete $arg{attach_to} || {}); |
15
|
2
|
|
|
|
|
16
|
$o->init(\%arg); |
16
|
2
|
|
|
|
|
6
|
$o; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
package Event::generic::Source; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new($) { |
22
|
1
|
|
|
1
|
|
12
|
return allocate($_[0], {}); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub watch(@) { |
26
|
0
|
|
|
0
|
|
|
return Event->generic("source", @_); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |