line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package YATT::Util::SymbolHash; |
2
|
13
|
|
|
13
|
|
44
|
use strict; |
|
13
|
|
|
|
|
13
|
|
|
13
|
|
|
|
|
376
|
|
3
|
13
|
|
|
13
|
|
41
|
use warnings FATAL => qw(all); |
|
13
|
|
|
|
|
14
|
|
|
13
|
|
|
|
|
363
|
|
4
|
|
|
|
|
|
|
|
5
|
13
|
|
|
13
|
|
44
|
use Exporter qw(import); |
|
13
|
|
|
|
|
11
|
|
|
13
|
|
|
|
|
469
|
|
6
|
|
|
|
|
|
|
our @EXPORT = qw(rebless_hash_with); |
7
|
|
|
|
|
|
|
|
8
|
13
|
|
|
13
|
|
4989
|
use Hash::Util qw(lock_keys unlock_keys); |
|
13
|
|
|
|
|
19316
|
|
|
13
|
|
|
|
|
51
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub rebless_hash_with { |
11
|
1
|
|
|
1
|
0
|
356
|
my ($self, $newclass) = @_; |
12
|
1
|
|
|
|
|
3
|
unlock_keys(%$self); |
13
|
1
|
|
|
|
|
5
|
bless $self, $newclass; |
14
|
1
|
|
|
|
|
4
|
lock_keys(%$self, keys %{YATT::Util::Symbol::fields_hash_of_class($newclass)}); |
|
1
|
|
|
|
|
2
|
|
15
|
1
|
|
|
|
|
23
|
$self |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1 |