line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Aspect::Library::Listenable::Event; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
610
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.04'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
13
|
|
|
13
|
0
|
16
|
my $class = shift; |
9
|
13
|
|
|
|
|
59
|
bless { @_ }, $class; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub AUTOLOAD { |
13
|
18
|
|
|
18
|
|
1252
|
my ($self, $value) = @_; |
14
|
18
|
|
|
|
|
21
|
my $key = our $AUTOLOAD; |
15
|
18
|
50
|
|
|
|
34
|
return if $key =~ /DESTROY$/; |
16
|
18
|
|
|
|
|
62
|
$key =~ s/^.*:://; |
17
|
18
|
50
|
|
|
|
84
|
return @_ == 1 |
18
|
|
|
|
|
|
|
? $self->{$key} |
19
|
|
|
|
|
|
|
: ( $self->{$key} = $value ); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub clone { |
23
|
7
|
|
|
7
|
0
|
8
|
my $self = shift; |
24
|
7
|
|
|
|
|
9
|
my $class = ref $self; |
25
|
7
|
|
|
|
|
9
|
my $clone = $class->new; |
26
|
7
|
|
|
|
|
24
|
while ( my ($key, $value) = each %$self ) { |
27
|
23
|
|
|
|
|
63
|
$clone->{$key} = $value; |
28
|
|
|
|
|
|
|
} |
29
|
7
|
|
|
|
|
17
|
return $clone; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub as_string { |
33
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
34
|
0
|
|
|
|
|
|
local $_; |
35
|
0
|
|
|
|
|
|
return join ', ', map { "$_:$self->{$_}" } sort keys %$self; |
|
0
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |