line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package YATT::Util::SymbolHash; |
2
|
13
|
|
|
13
|
|
68
|
use strict; |
|
13
|
|
|
|
|
22
|
|
|
13
|
|
|
|
|
419
|
|
3
|
13
|
|
|
13
|
|
68
|
use warnings qw(FATAL all NONFATAL misc); |
|
13
|
|
|
|
|
23
|
|
|
13
|
|
|
|
|
528
|
|
4
|
|
|
|
|
|
|
|
5
|
13
|
|
|
13
|
|
68
|
use Exporter qw(import); |
|
13
|
|
|
|
|
35
|
|
|
13
|
|
|
|
|
739
|
|
6
|
|
|
|
|
|
|
our @EXPORT = qw(rebless_hash_with); |
7
|
|
|
|
|
|
|
|
8
|
13
|
|
|
13
|
|
10880
|
use Hash::Util qw(lock_keys unlock_keys); |
|
13
|
|
|
|
|
36361
|
|
|
13
|
|
|
|
|
90
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub rebless_hash_with { |
11
|
1
|
|
|
1
|
0
|
710
|
my ($self, $newclass) = @_; |
12
|
1
|
|
|
|
|
5
|
unlock_keys(%$self); |
13
|
1
|
|
|
|
|
12
|
bless $self, $newclass; |
14
|
1
|
|
|
|
|
9
|
lock_keys(%$self, keys %{YATT::Util::Symbol::fields_hash_of_class($newclass)}); |
|
1
|
|
|
|
|
6
|
|
15
|
1
|
|
|
|
|
60
|
$self |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1 |