line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bot::ChatBots::Weak; |
2
|
6
|
|
|
6
|
|
65385
|
use strict; |
|
6
|
|
|
|
|
19
|
|
|
6
|
|
|
|
|
149
|
|
3
|
6
|
|
|
6
|
|
25
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
232
|
|
4
|
|
|
|
|
|
|
{ our $VERSION = '0.014'; } |
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
6
|
|
32
|
use Scalar::Util qw< weaken >; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
1713
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub clone { |
9
|
1
|
|
|
1
|
1
|
25
|
my $self = shift; |
10
|
1
|
|
|
|
|
5
|
return ref($self)->new($self); |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub get { |
14
|
1
|
|
|
1
|
1
|
656
|
my ($self, $key) = @_; |
15
|
1
|
|
|
|
|
4
|
return $self->{$key}; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub get_multiple { |
19
|
1
|
|
|
1
|
1
|
807
|
my $self = shift; |
20
|
1
|
|
|
|
|
2
|
return @{$self}{@_}; |
|
1
|
|
|
|
|
5
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new { |
24
|
8
|
|
|
8
|
1
|
853
|
my $package = shift; |
25
|
8
|
|
|
|
|
16
|
my $self = bless {}, $package; |
26
|
8
|
|
|
|
|
24
|
return $self->set(@_); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub set { |
30
|
26
|
|
|
26
|
1
|
1394
|
my $self = shift; |
31
|
26
|
100
|
100
|
|
|
127
|
my @args = (@_ && ref($_[0])) ? %{$_[0]} : @_; |
|
1
|
|
|
|
|
3
|
|
32
|
26
|
|
|
|
|
47
|
while (@args) { |
33
|
23
|
|
|
|
|
41
|
my ($key, $value) = splice @args, 0, 2; |
34
|
23
|
|
|
|
|
44
|
$self->{$key} = $value; |
35
|
23
|
50
|
|
|
|
84
|
weaken($self->{$key}) if ref $value; |
36
|
|
|
|
|
|
|
} |
37
|
26
|
|
|
|
|
56
|
return $self; |
38
|
|
|
|
|
|
|
} ## end sub set |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
1
|
1
|
1948
|
sub TO_JSON { return undef } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |