| 1 | package Aspect::Library::Listenable::Event; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | our $VERSION = '0.97_06'; | |||||||||
| 7 | |||||||||||
| 8 | sub new { | ||||||||||
| 9 | 13 | ▶ | my $class = shift; | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 10 | 13 | bless { @_ }, $class; | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | sub AUTOLOAD { | ||||||||||
| 14 | 31 | ▶ | my ($self, $value) = @_; | ||||||||
|
Subroutine
AUTOLOAD: called CC=3 SCAR=11.0
| |||||||||||
| 15 | 31 | my $key = our $AUTOLOAD; | |||||||||
| 16 | 31 | ▶ | return if $key =~ /DESTROY$/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 18 | $key =~ s/^.*:://; | |||||||||
| 18 | return @_ == 1 | ||||||||||
| 19 | ? $self->{$key} | ||||||||||
| 20 | 18 | ▶ | : ( $self->{$key} = $value ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | sub clone { | ||||||||||
| 24 | 7 | ▶ | my $self = shift; | ||||||||
|
Subroutine
clone: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 25 | 7 | my $class = ref $self; | |||||||||
| 26 | 7 | my $clone = $class->new; | |||||||||
| 27 | 7 | ▶ | while ( my ($key, $value) = each %$self ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 23 | $clone->{$key} = $value; | |||||||||
| 29 | } | ||||||||||
| 30 | 7 | return $clone; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | sub as_string { | ||||||||||
| 34 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
as_string: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 35 | 0 | local $_; | |||||||||
| 36 | 0 | return join ', ', map { "$_:$self->{$_}" } sort keys %$self; | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 2 | 1; | |||||||||