line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package YATT::Util::SymbolHash; |
2
|
13
|
|
|
13
|
|
62
|
use strict; |
|
13
|
|
|
|
|
21
|
|
|
13
|
|
|
|
|
379
|
|
3
|
13
|
|
|
13
|
|
63
|
use warnings qw(FATAL all NONFATAL misc); |
|
13
|
|
|
|
|
23
|
|
|
13
|
|
|
|
|
484
|
|
4
|
|
|
|
|
|
|
|
5
|
13
|
|
|
13
|
|
61
|
use Exporter qw(import); |
|
13
|
|
|
|
|
29
|
|
|
13
|
|
|
|
|
629
|
|
6
|
|
|
|
|
|
|
our @EXPORT = qw(rebless_hash_with); |
7
|
|
|
|
|
|
|
|
8
|
13
|
|
|
13
|
|
10583
|
use Hash::Util qw(lock_keys unlock_keys); |
|
13
|
|
|
|
|
34813
|
|
|
13
|
|
|
|
|
82
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub rebless_hash_with { |
11
|
1
|
|
|
1
|
0
|
362
|
my ($self, $newclass) = @_; |
12
|
1
|
|
|
|
|
4
|
unlock_keys(%$self); |
13
|
1
|
|
|
|
|
10
|
bless $self, $newclass; |
14
|
1
|
|
|
|
|
6
|
lock_keys(%$self, keys %{YATT::Util::Symbol::fields_hash_of_class($newclass)}); |
|
1
|
|
|
|
|
3
|
|
15
|
1
|
|
|
|
|
34
|
$self |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1 |