line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Listener;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7152
|
use 5.006;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings;
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
206
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.01.04';
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $DEBUG = 0;
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $callback_fmt = "_on_%s";
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub signal : method
|
14
|
|
|
|
|
|
|
{
|
15
|
1
|
|
|
1
|
1
|
550
|
my $this = shift;
|
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
2
|
my $event = shift;
|
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
4
|
my $method = sprintf $callback_fmt, $event;
|
20
|
|
|
|
|
|
|
|
21
|
1
|
50
|
|
|
|
11
|
return $this->$method( $event, @_ ) if $this->can( $method );
|
22
|
|
|
|
|
|
|
|
23
|
0
|
0
|
|
|
|
|
warn "D: $method - unimplemented event called\n" if $DEBUG;
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
return undef;
|
26
|
|
|
|
|
|
|
}
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1;
|
29
|
|
|
|
|
|
|
__END__
|